Commit Graph

29357 Commits

Author SHA1 Message Date
Maya Erez
a2fc655089 mmc: card: Adding support for sanitize in eMMC 4.5
This feature delete the unmap memory region of the eMMC card,
by writing to a specific register in the EXT_CSD
unmap region is the memory region that were previously deleted
(by erase, trim or discard operation)

Change-Id: I7f1df8e87fb782979fd90e064eca00704caca54b
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2013-02-25 11:40:51 -08:00
Seungwon Jeon
911034d6e8 mmc: core: Add packed command feature of eMMC4.5
This patch adds packed command feature of eMMC4.5.
The maximum number for packing read(or write) is offered
and exception event relevant to packed command which is
used for error handling is enabled. If host wants to use
this feature, MMC_CAP2_PACKED_CMD should be set.

Change-Id: I8013970fc9d54da7d92b0aca2bb0746189b9825b
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2013-02-25 11:40:50 -08:00
Subhash Jadavani
a264fbbef9 mmc: host: remove mmcq performance numbers statistics
mmcq performance numbers are not captured since asynchronous
MMC request support got added in MMC block driver. So printing
out these numbers (which are all zeros) just adds confusion.
This patch removes the printing of mmcq performance numbers
statistics.

CRs-Fixed: 364206
Change-Id: I7213b11c8e9e055894c9902af7e975de3be1c519
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2013-02-25 11:40:50 -08:00
Nicolas Pitre
bf31c42104 mmc: sdio: avoid spurious calls to interrupt handlers
Commit 06e8935feb ("optimized SDIO IRQ handling for single irq")
introduced some spurious calls to SDIO function interrupt handlers,
such as when the SDIO IRQ thread is started, or the safety check
performed upon a system resume.  Let's add a flag to perform the
optimization only when a real interrupt is signaled by the host
driver and we know there is no point confirming it.

Change-Id: Ibfd6b35589b15fabea7b1c18dfa2197a78866b61
Reported-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-02-25 11:40:49 -08:00
Pratibhasagar V
6df0e56f37 mmc: quirks: Fix data timeout values for certain SanDisk eMMC cards
Some INAND MCP devices advertise incorrect data timeout values.
This leads to data timeout errors on the platform. So, add a quirk
for such devices to facilitate proper functionality.

CRs-Fixed: 355347
Change-Id: If4fdd2724dc407450da8529222efca7ee94f50df
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
2013-02-25 11:40:47 -08:00
Subhash Jadavani
dc1c02e666 mmc: core: capture performance numbers only when asked
Currently performance numbers are captured for each SDCC
transfers unconditionally which may add the overhead and
could reduce the SDCC read/write throughput numbers.

This change adds additional control for enabling/disabling the
capturing of performance numbers at runtime. We already have sysfs
entry named "perf" for msm sdcc devices. Currently setting this
entry to 0 clears the performance statistics. But now we are
changing the definition of this entry as mentioned below:

Disable performance capturing and clear the performance statistics:
	"echo 0 > /sys/devices/platform/msm_sdcc.<n>/perf"

Enable performance capturing:
	"echo 1 > /sys/devices/platform/msm_sdcc.<n>/perf"

CRs-fixed: 345170
Change-Id: I3ab9288fd87cc8a8ada6c0c3d066cac4f68d79b7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2013-02-25 11:40:45 -08:00
Sujit Reddy Thumma
9e62cdceb2 mmc: core: Export mmc_set_ios so that host drivers can use it
mmc_set_ios() is used by host drivers during suspend/resume
routines in indirect way i.e., by calling host->ops->set_ios().
But now with MMC_CLKGATE enabled, mmc_set_ios() also updates
host->clk_gated flag. So export this API so that host controller
drivers can use it.

Change-Id: Ib0c177635bb8d87ba68c98e08b8d940c73f2b80c
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-02-25 11:40:44 -08:00
Sujith Reddy Thumma
72c0b2661c mmc: core: Determine correct access mode for eMMC cards by reading OCR
MMC core reads SEC_COUNT information from EXT_CSD register and assumes
that the card supports sector access mode. Some eMMC cards (<=2GB) do not
support this mode even though they have SEC_COUNT value defined, causing
failure while populating extended partitions. Sector/Byte access mode
information is stored in OCR register. Hence, read OCR bit 30 and then
confirm it with SEC_COUNT value to know  whether the card supports sector
access mode or byte access mode.

Change-Id: Ifdfff35309e8667cd2c2ac2761b9a708d5b785d3
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
2013-02-25 11:40:37 -08:00
Murali Palnati
fcaeb8c98a mmc: sdio: Fix sdio_disable_wide to properly handle 8 bit bus width.
Change-Id: I2e712f5d8f6ff8da9fdabe8cf30e378c560e067f
Signed-off-by: Murali Palnati <palnatim@codeaurora.org>
2013-02-25 11:40:35 -08:00
Sujith Reddy Thumma
4e5824f8ce mmc: core: Fix race between runtime PM suspend and block requests
There is a possible race with mmc_claim_host() in mmc_sd_suspend()/
mmc_suspend() and mmc_claim_host() in mmc_blk_issue_rq() when runtime
pm is enabled. Fix this by blocking processing of requests until the
previous runtime suspend is processed and then resume as part of
msmsdcc_enable(). Previous fix has card detection failure as a side effect
during resume.

Change-Id: I9cb31269638d9db4e630eb22b973a5335af1bda4
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
[sboyd: Dropped msm driver change]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:40:33 -08:00
Aparna Mallavarapu
6ccd10f3bc mmc: Add profiling code to measure performance at MMC layers.
Profiling code is added to measure read, write times for
the MMC requests at various MMC layers. Profiling is done
at the MMC queue and at the driver level. This information
can be viewed through a sysfs entry called perf.

Change-Id: I7c65bfe25a1f7774e3a9abf1f9539e690b3718ec
Signed-off-by: Aparna Mallavarapu <aparnam@qualcomm.com>
2013-02-25 11:40:32 -08:00
Rebecca Schultz
163772b7bb pmem: Add pmem driver
Signed-off-by: Rebecca Schultz <rschultz@google.com>

pmem: Use the thread group leader insted of the current thread.

Instead of keeping track of the current thread, use the thread group leader

Signed-off-by: Rebecca Schultz <rschultz@google.com>

pmem: Add some apis to reference and flush pmem files by file struct

The api to refer to pmem files by fd should be depricated, it can
cause problems if a processes fd table changes while the kernel is processing
data in a pmem file.  This change adds the safer api.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Remove unused depricated fd api to pmem.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Remove error message when calling get_pmem_addr

This call is used from the mdp driver to determine if the memory
is in pmem or in the fb.  We will encounter this case during normal operation
so this error message should be removed.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Add include sched.h to fix compile errors

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: remove HW3D_* ioctls

Signed-off-by: Dima Zavin <dima@android.com>

pmem: Expose is_pmem_file to the in-kernel users.

Signed-off-by: Dima Zavin <dima@android.com>

pmem: Make the exposed functions be noops if CONFIG_ANDROID_PMEM is not set.

Signed-off-by: Dima Zavin <dima@android.com>

misc: pmem: don't flush if file was opened with O_SYNC

Change-Id: I067218658a0d7f7ecc1fe73e9ff6b0c3b3054653
Signed-off-by: Dima Zavin <dima@android.com>
2013-02-25 11:40:30 -08:00
Lynus Vaz
0b74e5a2ad msm: IDLE_TIMER wakes up waiting processes
The msm_idle_stats_update_event() function is now a public function.
In case of IDLE_TIMER expiry, kgsl calls this function to immediately
wake up waiting processes.

Change-Id: Ia259d10e08deea71db047d8091cc97066fba3c1c
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
(cherry picked from commit bdb0c07e65cad13deea5d187ad553cc9782c620d)

Conflicts:

	arch/arm/mach-msm/idle_stats_device.c
	drivers/gpu/msm/kgsl_pwrscale_idlestats.c
2013-02-25 11:40:28 -08:00
Lynus Vaz
1d31fa5836 msm: idle_stats: Permit GPU DCVS daemon to configure number of samples
Add a struct member to allow GPU DCVS daemon to configure the number
of samples collected at runtime. This increases the responsiveness
of the daemon in low fps use cases.

Change-Id: Ibbf17c8a81c9bd819d96c16af2f17bc60c999df9
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
(cherry picked from commit fdecd1e91f9b211011a6610199219523e5794c68)

Conflicts:

	arch/arm/mach-msm/idle_stats_device.c
2013-02-25 11:40:27 -08:00
Lucille Sylvester
54246230c5 msm: kgsl: Add idlestats sleep event notification
Change-Id: Ie632d3f44661575ad8c7b41f064eff5f3b068f62
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
(cherry picked from commit 3b46d001e2e4f4aecd2de96e0950dbebdf4f96a3)

Conflicts:

	drivers/gpu/msm/kgsl_pwrscale_idlestats.c
2013-02-25 11:40:27 -08:00
Lucille Sylvester
a867463275 msm: Add idle_stats_device infrastructure
Add a core infrastructure for transmitting idle stats to user
space for use by other devices in the system such as the GPU.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
(cherry picked from commit 611d0d9e5b51f9e9906c956b619a91a35964210d)

Conflicts:

	arch/arm/mach-msm/Makefile

Change-Id: Ifed8a2636be0d381f616568ad85764d5e64a1757
2013-02-25 11:40:26 -08:00
Rohit Vaswani
c999112fac include: sx150x: Update License
Change-Id: I7e939e6184291d0768cb77d886962719731ce6ae
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-25 11:40:24 -08:00
Trilok Soni
0906d07116 matrix_keypad: Increase the max limit of rows and columns
Some keyboard controller have support for more than
16 columns and rows.

Change-Id: I3fd207bfcb21648e1e6601c20588907a6c45270e
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
(cherry picked from commit 1fcc71dd2431913af3a5baab5d2e25ffc318a5ad)

Conflicts:

	include/linux/input/matrix_keypad.h
2013-02-25 11:40:21 -08:00
Mohan Pallaka
71a224e616 pwm: Add __weak attributed functions for pwm operations
For chip drivers that support both pwm and non-pwm modes
would encounter compilation errors if the platform doesn't
have support for pwm though the chip is programmed to work
in non-pwm mode. Add __weak attributed pwm functions to avoid
compilation issues in these scenarios.

Change-Id: I6affff1ced9c84aefa3962b94780fd3e50ee1c35
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
(cherry picked from commit f056d9e5cfbd376a266c1db32c271d0f3ad0319b)
2013-02-25 11:40:21 -08:00
Stepan Moskovchenko
9efa182dfd ks8851: Add GPIO configuration platform data
Add platform data for the KS8851 SPI Ethernet device to
enable proper GPIO configuration for the reset and
interrupt pins.

Change-Id: I79adae4628f38a2ca5bc17825258c41ab5e1623d
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 93d79ecd11a79a097a5c051438d9c3502902af6e)

Conflicts:

	arch/arm/mach-msm/board-msm8960.c
	drivers/net/ks8851.c
2013-02-25 11:40:20 -08:00
Hamad Kadmany
178c5925fb media: dvb: dvb-core: Extend get-capabilities API
Provide richer information to applications about
actual demux capabilities

Change-Id: I5b849ea72366f5332f716735818b9f090c46de43
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
(cherry picked from commit d2c325e05cce18145b4639eb22b205efedfb34c5)
2013-02-25 11:40:19 -08:00
Mohan Pallaka
50b3ed2e2c input: atmel_maxtouch: Rename mxt_platform_data to maxtouch_platform_data
Opensource driver atmel_mxt_ts has the platform data
structure name as atmel_maxtouch. Avoid name conflict
by renaming atmel_maxtouch driver's platform data to
maxtouch_platform_data.

Change-Id: I4bf3ed83e3eab55c4464de365c6009965da73744
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
(cherry picked from commit 4e9a94e60d589581799ac7c3341ec4dfac8793a5)

Conflicts:

	arch/arm/mach-msm/board-msm7x27a.c
2013-02-25 11:40:18 -08:00
Rohit Vaswani
fca32e0d66 include: remote_spinlock.h: Add file (from 2.6.29)
Change-Id: Ie9603160308d58f0039495a8c15304e8dd35ac8c
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-25 11:40:17 -08:00
Shubhraprakash Das
5c0b9cbdf9 msm: iommu: Create iommu api to return the page table address
Create a new iommu api to return the base address of the domain's
pagetable.

Change-Id: Ibf5425fa7ae253b16bfe795614bd7943efd7e3e3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2013-02-25 11:39:41 -08:00
Stepan Moskovchenko
41b03a2df8 drivers: iommu: Add flags to iommu_domain_alloc
Add the ability to pass flags into the iommu_domain_alloc
function to specify domain attributes.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2013-02-25 11:39:41 -08:00
Stepan Moskovchenko
7a9d3fc77f drivers: iommu: Add map/unmap range ops
Add IOMMU ops functions to allow mapping and unmapping
whole ranges of address space based on a scatterlist.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2013-02-25 11:39:40 -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
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
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
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
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
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
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
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
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
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
Pavankumar Kondeti
d92234d06f USB: OTG: msm: Implement data contact detection based on timeout
Data contact can be detected by either current source or timeout
methods.  The current source method is not working for an unknown
reason.  Implement timeout based data contact detection.  The spec
allows any timeout between 300msec to 900msec.  Use 600msec.

CRs-fixed: 330217
Change-Id: I67151d1412f43ba974cc1afb164d6473f89d2dbf
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:25 -08:00
Manu Gautam
bdfa754b30 msm: clock: Use device names to distinguish between USB clocks
Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name. Clock names
are updated to match the new naming convention.

CRs-Fixed: 327559
Change-Id: I78757806589e037a0655a63e7ee20c935214c99d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2013-02-25 11:36:21 -08:00
Ofir Cohen
22add5aa36 usb: gadget: fix crash on USB cable disconnection
Crash was observed (9x15) when USB cable was
disconnected. Root cause was NULL pointer and
USB BAM reset due to USB PHY reset. On 9x15 no
reset on disconnect will be performed.

CRs-Fixed: 326999
Change-Id: I006afb8dcd225caf9280dd915f8af3edfaebff5a
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2013-02-25 11:36:20 -08:00
Anji jonnala
3da9c3c4da USB: OTG: prevent idle standalone PC when USB cable is connected.
When USB cable is connected, the mass storage function in the
device will get interrupts for every 3ms. Entering and exiting the
idle standalone PC itself will take around 3ms on 8960. Hence allowing
idle standalone PC when USB cable is connected causes processor to
spend most of the time in entering and exiting the idle standalone PC.
Hence Vote for minimum DMA latency to prevent idle standalone PC
when USB cable is connected.

Change-Id: Id625dc01f253ed553b2f65f08900022a8c6e1daa
Signed-off-by: Anji jonnala <anjir@codeaurora.org>
2013-02-25 11:36:14 -08:00
Anji jonnala
a6bfaac458 usb: msm_otg: vote and unvote for TCXO through XO API
USB PHY takes TCXO clock as input and using the PHY internal PLL,
gets the 480MHz clock for USB operations. While USB PHY is suspended,
the TCXO clock can be turned off.
On 8960 target, mandating that TCXO clock users must need to vote for
TCXO and if all the users vote for TCXO clock-off, then MSM can switch to
lower power clock and can run.

Change-Id: Ia9a91bca52a1003439a3a38bbd8eb835dbf349e1
Signed-off-by: Anji jonnala <anjir@codeaurora.org>
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2013-02-25 11:36:13 -08:00
Amit Blay
29a0e4da3e usb: otg: Upgrade support for PHY retention mode
Current implementation supports PHY retention mode, when
VBUS detection is done by PMIC.
This change adds the support for PHY retention mode, for
the case where VBUS detection is done by USB PHY.
In that case, the PHY wakes up the MPM and CORE using its
High-Voltage interrupts.

Change-Id: I5fec518337413f175a8bc671897836affc55381c
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2013-02-25 11:36:12 -08:00
Pavankumar Kondeti
9fff2227bf msm: Add device tree support for HSUSB
Add device tree support for MSM HSUSB.  The OTG driver registers
gadget and host platform devices based on the operational mode.
This patch also updates the copper device tree source file with
HSUSB device specifics.

Change-Id: I0a50b0500d15f32ff65468cdb411398a80a20329
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:11 -08:00
Pavankumar Kondeti
d6865ca34a USB: OTG: msm: Fix ACA implementation
Synopsis 28nm PHY has two different circuits for detecting changes on
ID line.  ID_DIG is designed for detecting ID_float vs ID_gnd.  ID_ACA
is designed for detecting RID_A, RID_B, RID_C states.  These are mutually
exclusive and enabling both circuits has undefined behavior.  Enable
ID_ACA upon VBUS high or ID_gnd events to detect further ACA states.

ACA ID_GND threshold range is overlapped with OTG ID_FLOAT threshold range.
Hence PHY ID_DIG circuit can not be used for detecting ACA ID_GND.  Use
PMIC ID circuit for detecting both OTG and ACA ID_GND.

Link controller can not generate PHY_ALT interrupt in host mode. But the
corresponding PHY register reflects the actual ID state.  Hence implement
polling to read PHY register to detect ID_GND --> ID_A, ID_A --> ID_B
transitions.  That means low power mode can not be allowed in host mode.
Also disallow suspending the device attached on the root hub.  Otherwise
PHY is put into suspend state automatically upon setting SUSP bit in PORTSC
register.

Link controller can not generate asynchronous interrupt for ID_ACA changes
in low power mode.  Hence disallow low power mode in ID_B and ID_C states.

USB_MSM_ACA is not selected by default. If it selected, ACA states can be
detected and low power mode is not allowed in host mode.  Writing "enable"
to <debugfs>/msm_otg/aca enables ACA irrespective of USB_MSM_ACA selection.
This is meant for debugging only.

Change-Id: I51e80d803a583c5bdffc8111696943c04958f604
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2013-02-25 11:36:10 -08:00
Vijayavardhan Vennapusa
98a85ae180 usb: msm_otg: Vote for EXT_3P3V regulator for MHL connector
In case of 8960 Liquid, need to vote for EXT_3P3V regulator
to avoid usb connection lost as MHL analog switch is powered
by this regulator.

Change-Id: Ifc36d7916a5407801fdf43357176efa264d160bd
CRs-fixed: 315979
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2013-02-25 11:36:06 -08:00
Amit Blay
1046a3580a usb: otg: Add usb_hs_system_clk to OTG driver for MSM9615
This change add usb system clock support to OTG Driver.
System clock is a 60MHZ input clock to the USB ChipIdea core.
This clock is required starting from MDM9615.

This change also removes the enforcement for using a phy_reset_clk
for reseting the PHY. Starting from MDM9615, PHY reset is not implemented.
The core is reset together with the PHY using "usb_hs_clk" signal.

Change-Id: Ifa4155269dd46a97a7e57dd28050663a12f54c70
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2013-02-25 11:36:04 -08:00