Commit Graph

301610 Commits

Author SHA1 Message Date
Srinivas Krovvidi
87ff113cd7 L2cap MTU is filled in failure case
Change-Id: Ieca0e5c44fdea98dfb1029624f46e0a20b865fe7
CRs-Fixed: 275636
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2013-02-25 11:37:07 -08:00
Mat Martineau
e60301d173 Bluetooth: Remove duplicate instance of l2cap_chan_ready()
The previous cherry-pick moved this function, but we want the pre-existing
version of l2cap_chan_ready().

Change-Id: I195892876ca1e2ea3b3e181cda4df76522dc9768
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2013-02-25 11:37:06 -08:00
Mat Martineau
8ac2605b2c Bluetooth: Add forward declaration to assist with next cherry-pick
Change-Id: I052a2e23dfa62a792beed4deef79b0b1c0da4bcb
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2013-02-25 11:37:06 -08:00
Mat Martineau
d3e0be7c90 Bluetooth: Add forward declaration
Change-Id: Ifd721cc6fbf9be24a4e9059c04b05467648af9e3
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
2013-02-25 11:37:05 -08:00
Stephen Boyd
069047086b Revert upstream bluetooth
This undoes all upstream bluetooth core changes since around
b79f44c (Bluetooth: Fix keeping the command timer running,
2011-04-11).

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:37:04 -08:00
Stephen Boyd
c21df1bfea net: Fix compile warning in tcp.c
Warnings fixed in the 3.0 kernel upgrade.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:37:03 -08:00
Chinh Tran
1afb767969 cne: Add reference count for Smart Wireless Interface Manager
Add the reference count for Smart Wireless Interface Manager to
know whether there are any process who still has the socket in
question in use or not.
Redefine the TCP_FLAG as it gives compiling error when an enum is defined
by a function return.

Change-Id: I1aa9c810fec2e332048c9ef4199ec3f996bc3a75
Signed-off-by: Chinh Tran <chinht@codeaurora.org>
2013-02-25 11:37:02 -08:00
Tianyi Gou
6d473f734c net_sched: Add flow control support to prio qdisc
Add enable_flow flag to the prio qdisc.  Packet flow is
enabled by default, but can be disabled from userspace
(e.g. IPROUTE2 tc tool).  This allows for suspending packet
dequeue on a per-qdisc basis, which is needed to supprot
Quality of Service (QOS) when using WWAN modem.

Change-Id: I932f296be946f1acc3b00c7d8569bbb733d33622
Acked-by: Andrew Richardson <randrew@qualcomm.com>
CRs-Fixed: 283471
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
2013-02-25 11:37:01 -08:00
Sunil Dutt Undekari
0c3474f55b net/wireless: Check for number of sub bands
WiFi Drivers can advertize the number of bands dynamically.
A check has been added to see if the band information is
present and only then the values are extracted.
Without this check, a kernel crash shall occur as we would
extract the band information though the driver does not
advertize.

Change-Id: Ia726a692a3c2dcef2fcff0a59363053524c5f806
Signed-off-by: Sunil Dutt Undekari<duttus@codeaurora.org>
2013-02-25 11:37:00 -08:00
Sunil Dutt Undekari
353e89c039 net/wireless: Support to disable CCK rate for management frame
Provision to distinguish the P2P scan and the normal scan
with no_cck flag and thus disable the 11b rates for
p2p scan.

Change-Id: Ia4073a5f926c6ac97dffdee99f54ba53535fea85
Signed-off-by: Sunil Dutt Undekari<duttus@codeaurora.org>
2013-02-25 11:36:59 -08:00
Deepthi Gowri
abccc76919 msm: nl80211: Add WAPI support for cfg80211.
This provides WAPI support for cfg80211.

Change-Id: I6ec1f6804cd9017bd332b4dd5ab06f18b390e120
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
[sboyd: drop net/wireless/nl80211.c part]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:59 -08:00
Jaime Lopez
3b6e9f543b ipv6: Enable new mode proxy_ndp == 2
This new mode allows Neighbor discovery packets to be sent to userspace
without regards to the state of the forwarding setting. Without this, NDP
packets addressed to the host are still received, but those for other
addresses are not.

Enabling this mode allows NDP proxying to be performed from userspace.

Change-Id: I69b7a7c0c42e3253c42d6f2e163c0ce1d848aed6
Signed-off-by: Jaime Lopez <jaimel@codeaurora.org>
2013-02-25 11:36:58 -08:00
Abhijeet Dharmapurikar
5cf8a4bc7f msm_rmnet: merge support for RAWIP msm_rmnet device
Add to support for msm_rmnet device using ARPHRD_RAWIP.

Change-Id: Ie1e5433f440b26b644cccb18083ef325129f7942
Acked-by: Andrew Richardson <randrew@qualcomm.com>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:36:57 -08:00
Stephen Boyd
50a332f764 Documentation: Point to correct header file
The header file was renamed to pm_qos.h in e8db0be (PM QoS: Move
and rename the implementation files, 2011-08-25) but this
documentation wasn't updated. Update it.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:56 -08:00
Stephen Boyd
51a90bdc29 Documentation: document msm_otg driver
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:55 -08:00
Stephen Boyd
b1ae0f1cde otg: msm_otg: Fix error path of motg allocation
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:54 -08:00
Stephen Boyd
f0f5f9b12a otg: msm_otg: Update license text
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:54 -08:00
Vijayavardhan Vennapusa
d58272c741 USB: msm_otg: Don't allow TCXO shutdown in host bus suspend
Currently otg driver is voting to allow TCXO shutdown in host
bus suspend due to which devices connected in system suspend
are not getting detected. Hence don't allow TCXO shutdown in
host bus suspend.

As long term solution, need HW rework for detecting connecting
devices in host mode during system suspend. This is required to
route D+ and D- lines to MPM for monitoring interrupt during
system suspend.

CRs-Fixed: 366111
Change-Id: Ic478a0e327b104eec64b5cfe2bd1f9369f8ef72e
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:36:53 -08:00
Vijayavardhan Vennapusa
bdd7f012e9 USB: msm_otg: Don't call power_supply_get_by_name in IRQ context
OTG driver should not be using power_supply_get_by_name in IRQ context
and calling this api for every USB cable insertion/removal is very
inefficient.

CRs-Fixed: 363098
Change-Id: Iae7f63c755fbb177abd23cbff0b81d3cd76f95b8
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:36:52 -08:00
Amit Blay
934d48ee63 usb: gadget: Add support for USB going into LPM on bus suspend
This change adds the ability of the msm_otg to go to LPM when
USB cable is connected and bus is suspended.
This ability is enabled by a board file parameter.

The msm_otg is notified about SUSPEND/RESUME events via the
UDC layer. New event for RESUME was defined for that.

Change-Id: Ic508f1898cc3b57ab76eccd379bea38ed363570b
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2013-02-25 11:36:51 -08:00
Abhijeet Dharmapurikar
ca7b067733 otg: msm_otg: fix otg boost ordering
While turning on the OTG, the charger should be configured to not draw
any current from the usb before turning on the 5V boost. While turning
off the OTG, the boost should be turned off before configuring the
charger to draw current from usb.

Fix this ordering.

Change-Id: Iebd9bf166334e34d92b2ada623dec71a5f0326eb
CRs-Fixed: 338648
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:36:50 -08:00
Jack Pham
40e27e760e usb: msm_otg: system resume only resumes hardware when needed
Part of commit d44455a0b838b1d691e63913f0b159552ac01803 introduced
a regression affecting resume behavior in that the controller's system
resume callback is being followed by an immediate runtime suspend; if
the system resume was caused by an OTG event, there would be a pending
runtime resume in the state machine function, which might fail due to
this race, causing the PHY to be unnecessarily reset.

This patch limits the actual hardware resumes to happen only when needed.

If a possible wakeup event such as VBUS or ID interrupt occurs while
in system suspend, don't allow runtime resume to execute in the wakeup
handler but rather defer the resuming to the system resume callback.
Also by incrementing the PM runtime usage counter within the system
resume, it may help prevent the premature runtime suspend from happening
immediately afterward. Otherwise, if there is no such OTG event, and
the controller is not a suspended host, do nothing.

If the bus is instead runtime suspended (and not system suspended) when
a wakeup event occurs, then normal runtime resume will bring the
hardware out of low power mode.

CRs-fixed: 358761
Change-Id: I4249690485949ecb3072e258859608ecea52ec9b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2013-02-25 11:36:49 -08:00
Ofir Cohen
616c0c9a37 usb: gadget: Vote for SWFI when USB cable is connected
To enable better power management and entering CPU idle states while
USB cable is connected and no USB SW involvement is required
(MSM BAM2BAM mode) a new SysFS was added.
This SysFS allow controlling USB voting and gives the ability
to save power consumption while USB is active.
default behavior is high QoS. to change the new SysFS
echo high/low to /sys/class/android_usb/android0/pm_qos

Change-Id: Ia73491cfddc3968e1d04423a1750c89fab5fefeb
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2013-02-25 11:36:49 -08:00
David Ng
1ef0dbf844 USB: OTG: MSM: Enable VDD CX regulator voltage setting for all configs
Enable VDD CX regulator voltage setting even for kernel configs
without PM_SLEEP enabled.  This is required so that USB functions
without power management.

Previously disabling power management also incorrectly disables USB.

Change-Id: I81d04cbca2e956e12fe40eeb97fbaab8c2ec1fd2
Signed-off-by: David Ng <dave@codeaurora.org>
2013-02-25 11:36:48 -08:00
Vijayavardhan Vennapusa
840f731512 USB: OTG: Fix PHY stuck issue in USB HOST mode
Disable PHY VBUS comparator if otg driver depends on PMIC
for VBUS and ID notifications. If enabled, VBUS comparator is
creating some noise to SESSVLD comparator and causing SESSVLD
comparator to trigger low due to which link state machine becomes
stuck as it operates solely on that value.

CRs-Fixed: 355991
Change-Id: Ieb8101f3063ebf9898da3ec9fd158c248a6cb15a
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:36:47 -08:00
Mayank Rana
d9bbfe6fb3 msm_hsusb: Vote for corner of VDD CX instead of voltage of VDD CX
New platform uses RBCPR hardware feature, with that voting for
absolute voltage of VDD CX is not required. Hence vote for corner of
VDD CX which uses nominal corner voltage on VDD CX.

CRs-Fixed: 355399
Change-ID: I22a73c5a439c98195b907ff3d032eb675a557612
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2013-02-25 11:36:46 -08:00
Stephen Boyd
a0806f9eed USB: OTG: msm: Fix inconsistent lockdep state warning
=================================
[ INFO: inconsistent lock state ]
3.0.21-g51ce160-00021-g8b33780-dirty #2904
---------------------------------
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W}

kworker/0:1/32 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&irq_desc_lock_class){?.....}, at: [<c01cfd10>] irq_read_line+0x3c/0x80
{IN-HARDIRQ-W} state was registered at:
  [<c01b8768>] __lock_acquire+0x704/0x9f8
  [<c01b9034>] lock_acquire+0x10c/0x130
  [<c0833ac8>] _raw_spin_lock+0x44/0x54
  [<c01d1c30>] handle_fasteoi_irq+0x14/0x108
  [<c01ce8ac>] generic_handle_irq+0x28/0x3c
  [<c0106f6c>] handle_IRQ+0x7c/0xc0
  [<c0100458>] gic_handle_irq+0xac/0x104
  [<c0834798>] __irq_svc+0x58/0x8c
  [<c01070b4>] default_idle+0x28/0x2c
  [<c010742c>] cpu_idle+0x8c/0xf4
  [<c0808ddc>] rest_init+0xd8/0x100
  [<c0008a90>] start_kernel+0x464/0x4d8
  [<8020803c>] 0x8020803c

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&irq_desc_lock_class);
  <Interrupt>
    lock(&irq_desc_lock_class);

 *** DEADLOCK ***

2 locks held by kworker/0:1/32:
 #0:  (events_nrt){.+.+..}, at: [<c019c49c>] process_one_work+0x1f8/0x518
 #1:  ((&motg->sm_work)){+.+...}, at: [<c019c49c>] process_one_work+0x1f8/0x518

stack backtrace:
[<c010c798>] (unwind_backtrace+0x0/0x12c) from [<c01b53bc>]
[<c01b53bc>] (print_usage_bug+0x248/0x2ac) from [<c01b5804>]
[<c01b5804>] (mark_lock+0x3e4/0x6ec) from [<c01b87f4>]
[<c01b87f4>] (__lock_acquire+0x790/0x9f8) from [<c01b9034>]
[<c01b9034>] (lock_acquire+0x10c/0x130) from [<c0833ac8>]
[<c0833ac8>] (_raw_spin_lock+0x44/0x54) from [<c01cfd10>]
[<c01cfd10>] (irq_read_line+0x3c/0x80) from [<c04e79b8>]
[<c04e79b8>] (msm_otg_sm_work+0x1a0/0x1510) from [<c019c57c>]
[<c019c57c>] (process_one_work+0x2d8/0x518) from [<c019cb94>]
[<c019cb94>] (worker_thread+0x220/0x3a0) from [<c01a2a80>]
[<c01a2a80>] (kthread+0x88/0x94) from [<c0107008>]

Change-Id: I7966d183cad54758508cb9635ebe3f31fba408b9
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:45 -08:00
Pavankumar Kondeti
eab71e3bcd USB: OTG: msm: Handle alt_core_clk missing case
The USB alt_core_clk is only enabled during reset sequence, since PHY
does not supply it during the reset and link needed a free running clock
during the reset. This clock is not present on SoCs, where link uses
an asynchronous reset methodology.

Change-Id: I124e705c6e2d26fc2c7fccc1877e2c80e1e8e945
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:44 -08:00
Pavankumar Kondeti
6e30b51a26 USB: OTG: msm: Fix error handling in probe
If clk_get on core_clk fails in probe function, the return value
is incorrectly assigned.  Assign the ret variable to the error
code returned for core_clk not alt_core_clk.

Change-Id: Icca82e8e44cd40149205c246f427ab82e4656268
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:43 -08:00
Rajkumar Raghupathy
178d1f3b8e USB: OTG: msm: Set charger type and state before notifying to PMIC
Fix the bug where charger type and state are set after notifying to PMIC
in B_IDLE and B_PERIPHERAL otg states.

Change-Id: Ia5f7b62b61bb3d8c239690c5e37f74c60a383096
CRs-Fixed: 353711
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2013-02-25 11:36:43 -08:00
David Keitel
792a6c08d7 Revert "USB: OTG: remove pm8921_set_usb_power_supply_type"
This reverts commit 34b874562012c3453da20059094992140ca1ea61.

Revert the removal of the set_usb_power_supply_type to allow
customized charger drivers to leverage off of the information
provided by the usb driver.

Change-Id: I3629202ac65793a8c5819d4371048c212030ae47
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2013-02-25 11:36:42 -08:00
Jack Pham
621d7a8d99 usb: otg: Do not call runtime suspend from system suspend callback
According to the commit text of "PM: Limit race conditions between
runtime PM and system sleep (v2)", a driver should not call
pm_runtime_suspend() from its .suspend() callback, as that creates
a recursive call into the subsystem.

This fixes msm_otg_pm_suspend() from doing just that. Instead, call
the helper function to explicitly suspend, without depending on the
runtime PM call. Likewise, the system resume callback should actually
resume the device.

Change-Id: I6ef0609dc4979ad31ef338e1eee3d21af47c256b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2013-02-25 11:36:41 -08:00
Pavankumar Kondeti
bd16d2645b USB: OTG: msm: Fix bug in wall charger disconnect detection
PHY retention and HV interrupts are not enabled while entering into low
power mode with wall charger connected.  But PHY is put into suspend mode.
If PMIC notifications are unavailable, enable asynchronous interrupt to
detect wall charger disconnection. If it is not enabled, no further
interrupts are triggered by PHY.

CRs-fixed: 352210
Change-Id: I107e1c91a29d65594a603a5651cd0bfe5b792bcc
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:40 -08:00
Chiranjeevi Velempati
70483e4de7 USB: OTG: Reduce ACA ID polling timer period
The current ACA ID timer period is 2 sec. If charger is plugged
in or removed, the UI update will take 2 sec in the worst case.
Reduce the current period from 2 sec to 500 msec for better
UI experience.

CRs-Fixed: 346923
Change-Id: I933b22aa8d4dc517eb5a5bf3fa25ba7ce693411c
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:36:39 -08:00
Stephen Boyd
9d27192644 Revert "usb: msm_otg: Migrate to clock apis for XO voting"
This reverts commit 7dd2266ae3d3f1d2cb93d1d3bb40aecf23821e76.

It was a mistake to move the usb driver to the clock apis for XO
buffer voting. Due to an RPM design CXO and D0 are the same but
we would like to hide that from the users of the buffers.
Therefore the msm_xo driver itself remaps the D0 buffer request
to the cxo clock until the RPM is fixed.

Change-Id: I230de55d30a49fa5bcf0d07f40453f1e09c4a9b1
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:38 -08:00
Mayank Rana
65c3a96064 USB: OTG: Migrate to devm_regulator_get()
Clean up some error paths and simplify the code by
moving to devm_regulator_get().

Change-Id: I782569d2d5aec077ea18516db7eba92897698bce
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2013-02-25 11:36:37 -08:00
Vijayavardhan Vennapusa
fef886d345 USB: Set AHB HPROT Mode to allow posted data writes
Currently writing 0x0 into AHBMODE register which means both data
transactions and QH and TD descriptors are non-posted writes to
system memory. As per HW team recommendation, should write 0x08 value
to set AHB HPROT mode into the AHBMODE register which allows posted
data writes to system memory and will improve the throughput numbers.

Change-Id: Ib44a8cfe11c6ff96ff712643227532e24548e706
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:36:37 -08:00
Chiranjeevi Velempati
d0bb7f4c04 USB: OTG: msm: Add debugfs entry to read otg_state
This change add's support for reading the otg_state of the device
through debugfs.

CRs-Fixed: 346906
Change-Id: Ifc0d28aa8626827f10740b97642946a564f78ca6
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:36:36 -08:00
David Keitel
afd4bd25bc USB: OTG: remove pm8921_set_usb_power_supply_type
This custom notifier is no longer required to determine
wether a wall charger is connected to the PM8921 charger
or not.

The pm8921-charger driver determines AC charging solely
dependent upon maximum input current from the charging
device.

CRs-Fixed: 339841
Change-Id: I564fa01c61286d013be6b263d038e87568a297f2
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2013-02-25 11:36:35 -08:00
Vijayavardhan Vennapusa
395698c2bc USB: OTG: msm: Add support for SRP and HNP
This patch changes OTG driver to support different
OTG statemachine states for OTG2.0 complaince. It will
also enable to swap Host role between two OTG devices
via HNP and enable B device to request A device to start
VBUS session via SRP.

Change-Id: Ibe2519ff1570768f51e879af483a6f5c23b38d8f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:34 -08:00
Manu Gautam
9d45004c83 USB: OTG: msm: Add debugfs entry to disable MSM BUS bandwidth voting
OTG driver requests for high bus bandwidth as long as USB cable is
connected to improve USB throughput. This vote causes scaling up of
fabric frequencies and increase in the over system power consumption.

Some users might not be interested in this feature or may want to
disable this at runtime for profiling the system performance with USB
cable attached.
Hence, add a debugfs entry to allow users to disable this voting.
By default this feature is enabled.

Command to disable BUS voting from USB:
echo "disable" > <debugfs>/msm_otg/bus_voting

Change-Id: Icdd9c56623a9c91ff3a130d80983c3ddeb0f91c4
CRs-fixed: 341452
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:36:33 -08:00
Manu Gautam
ff371e6448 USB: msm: Use new clock framework APIs
Clock framework now provides two new APIs: clk_prepare and
clk_unprepare which can be called from non-atomic context only.
Other clk_enable and clk_disable APIs can be called from atomic
context.
To enable a clock drivers need to call both clk_prepare and
clk_enable. Similarly for disabling a clock - clk_disable and
clk_unprepare should be called.

Change-Id: I1ec0764e34619b92d811e1dadd2bb49b5cf36f5c
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:36:32 -08:00
Pavankumar Kondeti
8bf49c9039 USB: OTG: msm: Disable PMIC ID pullup before enabling ACA ID detection
PMIC internal pullup resistor to be between 75k - 480k.   The ACA
pulldown resistor can range from 36k - 220k.  So leaving the PMIC
internal pullup on while the PHY does ACA detection would cause
problems.

Change-Id: I70e68094ce96a79531b7d3173c9a23fdcc52840d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:31 -08:00
Pavankumar Kondeti
1f566426ee USB: OTG: msm: Fix wall charger compliance issues
Battery charging spec 1.2 mandates portable devices to enable
VDP_SRC while charging from dedicated charger port.  Enable
VDP_SRC after detecting the charger as wall charger and enter
low power mode.  PHY can not drive VDP_SRC in retention.  Vote
against PHY retention and PHY power collapse.

Disable primary detection circuit and wait for 20msec before
enabling secondary detection circuit.  This would allow complete
discharge of voltage on the DM.

The DP/DM voltage source on time is taken as 40msec.  The spec
allows any value greater than 40msec.  Increase this timeout value
to 50msec for passing compliance tests correctly.

CRs-fixed: 330227
Change-Id: I0bc72b2098ff52644daab3a902b5ba099bb83667
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:31 -08:00
Manu Gautam
4dd770891d msm: 8960: usb: Add msm_bus vote when cable is connected
Drivers need to specify their bandwidth requirements to
bus-scaling driver to get guaranteed bandwidth on fabrics.

USB hardware uses a single buffer to transfer data across the
bus. As a result USB performance is highly dependent on system
fabric frequency as USB controller continuously sends NAKs on
the USB BUS unless complete buffer is filled/drained to the memory.
Hence, request for high bus bandwidth as long as USB cable is
connected to improve USB throughput.

While testing with Class-10 Extreme III SD cards, this patch
seems to improve the IN performance from 15MBps to 24MBps and
OUT performance from 11MBps to 16MBps.

CRs-Fixed: 327557
Change-Id: I21c284c611a09b1b12df9ae7a6f39e0b1bff45ef
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:36:30 -08:00
Stephen Boyd
8c5bc3e42c usb: msm_otg: Migrate to clock apis for XO voting
Use the clock APIs instead of the msm_xo APIs to vote on CXO.
This removes one more msm specific api from this driver and will
allow us to move XO control into the rpm clock driver.

Change-Id: Ie9344aad20651002e98f13cd3adb39680fbd93bd
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:29 -08:00
Manu Gautam
ceac912ada USB: OTG: Do not start charging before device enumerates
USB battery charging specification defines that device should
not start charging from SDP (or host port) before connecting
i.e. pulling high data line.
Hence, instead of charging immediately after performing detection,
wait till device configuration is selected by host.

Change-Id: I77dd29d1b4fbb57bc2f4362ef77d6a9c73ab6653
CRs-Fixed: 333556
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:36:28 -08:00
Mayank Rana
ec21fb1668 USB: OTG: Update vbus_is_on variable for pdata based vbus power routine
vbus power routine can be different based on platform. If vbus power
sequence is provided using platform data(pdata), disconnect of OTG cable
doesn't turn off the VBUS related regulators and required other
interfaces. This issue is seen as vbus_is_on variable remains always zero
for pdata based vbus routine, and msm_hsusb_vbus_power(motg, 0) doesn't
invoke the required vbus power routine. Hence update the vbus_is_on
variable based on return value of pdata based vbus routine. With this
change, it is mandatory that pdata based vbus routine should return the
success/failure result.

CRs-Fixed: 332434
Change-Id: I4c7ce48057f65227b09aac788d0ad24d0f30ed7e
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2013-02-25 11:36:27 -08:00
Chiranjeevi Velempati
ee63040039 USB: OTG: Notify the charger type to the PMIC driver
Till now, we are communicating only the amount of the current that
should be drawn by the PMIC for charging from the OTG driver through
power supply class driver. With this change, we notify the type of the
charger connected as well, so that userspace can benefit for dispalying
the charger type in the UI.

CRs-Fixed: 329868
Change-Id: Ibe92c4450bc9b4b023b9aceab57b624bde39a4fe
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
2013-02-25 11:36:26 -08:00
Stephen Boyd
ce0caae698 usb: msm_otg: vote and unvote for CXO_CLK instead of D0
The D0 clock buffer is ignored by the RPM and thus the RPM turns
off D0 even when Linux has requested it. Vote on CXO_CLK instead
until the RPM properly handles D0+CXO_CLK resources.

Change-Id: Ie69b7aebabf9638878a75026a99be76eeed7ecd8
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:36:25 -08:00