This patch ads core.c, the file which implements the ioctls and
registers the devices
Change-Id: I30a1d8b561ecd15b6a862d6948368394edd49665
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
- During bootup, create a file system storing the
information about usb device state and name, and
broadcast the message to userspace whenever the
device is plugged or unplugged.
- Register the device at USB sound card initialization
for creating file system and toggle the state in that
filesystem when USB is plugged/unplugged. This will
also send a message to user space informing it about
state change.
Change-Id: Icd78273bb765a26bbc70725afebe8955de8f7315
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
Use SPECIAL format for AMR. Add mixer control to
input mode and rate.
Change-Id: I8746d86ce323744995575a22b6128b39daaa3d13
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
[sboyd: Drop soc/msm parts]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This reverts the if/else part of
4466903481. We don't know why it
was done though and this should probably be dropped after testing.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Ensure clocks are always enabled before any interaction with the
host controller driver. This makes sure that there is no race
between host execution and the core layer turning off clocks
in different context with clock gating framework.
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
[sboyd: Keep non-upstreamed bits for sdio.c]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
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>
MMC_CLKGATE feature can be enabled for Atheros AR6003 cards as
the host supports asynchronous acitivity notification when the
clocks are off.
Change-Id: Ieff00382894a0841496776dc6a6b1db53e204d6d
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
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>
test->highmem can be NULL if no page can be allocated.
In this case don't try to free it which can cause NULL
pointer dereference crash.
Change-Id: I6c31a265fd801dfc4169530e3f39ffcf6590f5a8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
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>
MMC_CLKGATE feature can be enabled for Volans cards as
the host supports asynchronous acitivity notification
when the clocks are off.
Change-Id: Ic6cfa7fb2e713dcf1d2c6b2ae9df9cf0394f8c4a
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
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>
mmc_resume_host() is called during resume (runtime or system) which calls
1. mmc_power_up
2. mmc_select_voltage
3. host->bus_ops->resume() (mmc_sd_resume())
mmc_sd_resume() ultimately calls mmc_sd_init_card() to initialize the
SD card. But let's say if mmc_sd_init_card() fails during the
execute_tuning(). At this point, host controller timing is changed
to SDR104/SDR50 mode and host clock will also be > 100 MHz.
If there is an error returned by mmc_sd_init_card() and
if CONFIG_MMC_PARANOID_SD_INIT defined, it retries by calling
mmc_sd_init_card() without making sure that host controller timing
and clock be initialized again. This may cause the further
mmc_sd_init_card() also to fail.
To fix this, mmc_sd_resume() should call mmc_power_up()
and mmc_select_voltage() before retrying.
Change-Id: I8de39ea547fa0d5eca478719a4cf9255b6652503
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
SDCC runtime suspend can race with mmc_rescan causing deadlock.
The call flow would be this:
1) When runtime suspend is triggered:
msmsdcc_runtime_suspend()
-> mmc_suspend_host()
-> mmc_flush_scheduled_work()
2) mmc_flush_schedule_work() waits for mmc_rescan() work
to be completed if it is already in runqueue.
3) When mmc_rescan() is scheduled to run:
mmc_claim_host()
-> msmsdcc_enable()
->pm_runtime_get_sync()
4) pm_runtime_get_sync() waits for runtime_suspend to complete,
and hence cause two threads to wait upon each other.
Fix this deadlock by aborting runtime suspend when mmc_rescan
is scheduled.
CRs-Fixed: 326610
Change-Id: I4ca88651f80f5a1bfccb6e0c07e3ea83fadcdc57
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msleep of any delay less than 20ms (or 2 jiffies) would
give an unpredictable delay (most of the times as ~20ms).
Use usleep_range in mmc_delay() for delays less than two jiffies.
Change-Id: I7cf22532af2b4048afccf07a5aeba89d808799f0
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Qualcomm SDCC controller supports minimum SD clock frequency
which is required for card initialization. This information is
exported through platform data for each SDCC controller. There is
no need of retrying higher frequencies than the minimum supported
by controller for Qualcomm chipsets which inturn add delay in
detection process if there is no card during suspend/resume cycles.
Hence, skip multiple frequency retries.
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
When SD/MMC card is removed without unmounting and
then reinserted again while gendisk is freed. Partition
invalidation and deletion may take more than 10secs during
which SDCC controller can suspend due to runtime pm functionality.
Once the block layer activity is done it claims host to detach card
from MMC bus which triggers SDCC resume. As the host->card is
NULL already there is a BUG_ON hit in mmc_sd_resume(). Fix this
by claiming host even before we free host->card.
CRs-Fixed: 284262
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit 5eed6a9778440ef512f597b43368337a7ef9438b)
Change-Id: I6b58aab1865a93a025fd9912200ab0beea21be92
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
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>
Depending on the host and card's capability SDIO cards can
operate at 8-bit buswidth.
Change-Id: I2ed1c5ecaff521db693db47928b0958ed0289645
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Qualcomm-SDIO client on MDM contains NULL tuple for all SDIO functions 1 to 7
and doesn't contain any valid data. This patch is a temporary software
workaround (not to read CIS if it is NULL tuple) until the hardware bug is
resolved. The device ID 0x23F0 is for the SDIO client core on MDM8220. The
device ID 0x23F1 is used for msm8660_charm.
Change-Id: I82f44d313b3d499462977a0a9bbc0759f489ae95
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Murali Palnati <palnatim@codeaurora.org>
Signed-off-by: Raj Kushwaha <rajk@codeaurora.org>
[sboyd: Squash in two other device id patches]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
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>
The current code doesn't set any timeout value for bus test commands
CMD19 and CMD14. This fails bus test because the controller returns
DATATIMEOUT error for these commands. Fix the bus test timeout value
to 1ms for all cards.
Change-Id: I12446e094302f51853cc0c56a5c13b4a6a46d8cb
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
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>
Hack to maintain compatibility with existing Android userspace.
Change-Id: Ia6d768b3d51553bb43e7f70e605c2996a874e8cb
Signed-off-by: Colin Cross <ccross@android.com>
[sboyd: touchscreen won't work without this patch]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Added text file which describes MPQ DVB adapter implementation
and the extensions made for linux DVB core
Change-Id: I50df66a8bec52c224dd00be205ffc022c4d1f13a
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
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
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
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
Add build id detection to enable the interleave mode feature in the driver.
In the interleave mode image ( boot, userdata etc ) codewords are written
to the NAND devices in a interleave fashion. Hence modem and apps should
operate in the same mode to read/write the images properly.
Change-Id: Ie9182eadd5750662dde07abfe793b4d231cf0ae1
Signed-off-by: Murali Nalajala <mnalajal@qualcomm.com>
(cherry picked from commit e80fa943d6aba79406c5793c84c5afa076a84e0c)
Conflicts:
arch/arm/mach-msm/board-msm7x30.c
arch/arm/mach-msm/devices-msm7x30.c
drivers/mtd/devices/msm_nand.c
For the Nand controller on 7x30 and 7x27a, the
uncorrectable error bit in the NANDC_BUFFER_STATUS
register is changed to BIT(8) from BIT(3) (in legacy
targets) due to change in the ECC requirements. Currently,
this is handled only in dual nandc mode (default for 7x30
and 7x27a). In case, if only single nandc is used, the
uncorrectable bit check is broken and the driver wouldn't
detect any ECC errors.
Add software version info in platform data to differentiate
between the targets that have different register interface.
CRs-Fixed: 365433
Change-Id: I3c33ccb0e936e262116dd20798d56530dbae900f
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit ec9b3250fe233e4ff96b4ad23372df5f8299fc67)
Conflicts:
arch/arm/mach-msm/devices-9615.c
arch/arm/mach-msm/devices-msm7x27a.c
arch/arm/mach-msm/devices-msm7x30.c
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
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
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)