Jeeja [Thu, 6 Oct 2011 15:18:36 +0000 (16:18 +0100)]
ASoC: mfld_machine: Enabled PM Functionality Audio codec driver
During voice call and System in S3, disconnect the call. HAL opens the
headset-dai and plays a short tone after call is disconnected. Audio driver
responds to Headset-close(), by disabling the PLL. But DAPM for disabling the
widgets and VAUD is trigger after 5 seconds,by this time system goes to S3 and
function to invoke vaud off is not called.This will cause power dissipation.
This patch implements PM in ASoC driver which disable VAUD when system enters
S3.
Change-Id: If5383fd70f2bfb8a0c350d1eeb2a13a44be3ef1c
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Jeeja [Thu, 6 Oct 2011 15:18:35 +0000 (16:18 +0100)]
ASoC: sn95031: intel_sst: Fixes delay in powering up PLL and firmware download
Powering up of Audio rail and firmware download together was consuming 80ms
which didn't meet the latency requirement for openning a pcm device.
This patch fixes the delay during firmware download by caching the firmware
instead of using request_firmware() when firmware download is required and also
reduces the delay from 10ms to 1ms to power up PLL.
Change-Id: I4585bb9fc4b9ede9f99c001d8538bf4246c1b22f
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Louis Le Gall [Thu, 6 Oct 2011 15:18:35 +0000 (16:18 +0100)]
intel_sst: Allow automatic DMA LLI for I2S SSP
The DMA LLI stall after first block if the CSR2 register in
LPE Shim are not configured properly.
The LPE Shim register are not accessible from SSP I2S driver,
only by SST driver.
Modification will not impact other component, change will be
done for SSP0 and SSP1.
Change-Id: I502931a1bef9809bbd35c39845416af6d80843fb
Signed-off-by: Louis Le Gall <louis.le.gall@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
ASoC: sn95031: msic pcm1 is configured to short sync mode when not in use
PCM1 port is used for voice call communication. Currently PCM1 port
of MSIC is configured to I2S mode. But in I2S mode, even when
PCM1 is disabled, the TX line is pulled low. This should be ideally
Hi-Z state when disabled.
After few experiments, it has been found that configuring the
PCM1 port to short sync or long sync mode when not in use makes
the TX line to Hi-Z state.
This patch configures the PCM1 port to short sync mode when the port
is not in use. When PCM1 is in use, it will be configured to I2S mode.
Change-Id: I36901afe873bf40920b34fbc24d670ae96c7293e
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Guillaume Denneulin [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
intel_sst: fix post processing ioctl header and size management
The sst driver was wrongly calculating the size of headers for post processing
ioctls. Also the get method didnt copy enable status if algorithm
Change-Id: I28e9028b9aa09eaf746add0edf0ad52c0db1fad1
Signed-off-by: Guillaume Denneulin <guillaumex.denneulin@intel.com>
[fixed comit log and checkpatch errors in patch -Vinod]
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:34 +0000 (16:18 +0100)]
ASoC: sst_platform: eliminate "Control path in use error"
Music stops for a while after press Pause/Resume several times when effect
enabled
This patch removes the DROP operation during prepare.
Change-Id: I4aa4787424df6a512ee50691f34bc5d96ae5c602
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
ASoC: sn95031: enable penwell osc_clk0 for vibra operations
osc_clk0 of penwell is connected to PLLIN of MSIC.
Currently osc_clk0 is enabled only when either voice
call or music playback is active.
Enable the osc_clk0 of penwell during vibra/haptics
use cases. Enabling the osc_clk0 is achieved through
sending a command to the SCU firmware
Change-Id: I8d73e7517eaa34cf8752ab65138bffebed500abd
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Jeeja [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
intel_sst: Ensure LPE is in stalled before downloading Firmware
The FW download fail error occurs mainly when the copy of LPE FW code
and data from audio driver to the DSP IRAM/DRAM is not successful or
encounters error.But there is no mechanism in driver to know if the
memcpy_toio has failed or not.
This patch ensures LPE is in stalled state before copying the firmware
Change-Id: I9a4ed7fbddbfac9140daaa53b949e76729d104a5
Signed-off-by: Jeeja <jeeja.kp@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
ASoC: sst_platform: sn95031: Support for BCU event handling
Audio driver was not handling the BCU events
This patch handles the BCU event for IHF speakers
The impact is that, when the audio driver gets an Over current interrupt
it restores the IHF audio volume back to the original level.
Change-Id: I8eb94b37e5104c731dd630c1ce041d7581af0924
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:33 +0000 (16:18 +0100)]
ASoC: sn95031: enable the DMIC bias
this patch enables the digital mic bias when the digital mics are in use
Change-Id: I5283b7369d3610f0fafcbdb4d869055f0caeddb8
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:32 +0000 (16:18 +0100)]
ASoC: sn95031: mfld_machine: Fix for jack detection failure for the first time
If headset is plugged into the jack during board boot up, the following
scenario of routing playback fails, i.e from headset to IHF and then to
Headset.
This patch fixes the issue, by handling all the jack interrupts from msic,
and also by initializing the jack_interrupt_status to 0 if the codec value
is NULL.
Change-Id: I96d04b29fe89ee2d399c979bd112f222d46969a2
Signed-off-by: Dharageswari.R <Dharageswari.R@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:31 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: disable the pcm2 in platform close
Sometimes call ringtone is not heard, when headset is connected.
Root cause is PCM2 turned off when audio rail is switched off and
then it's not enabled again.
By disabling the PCM2 when all streams are idle fixes the problem.
Even if audio rail power cycles, PCM2 will remain to be active.
Change-Id: Ic3f8ce5ea150bbdc988e43f507d09b8a5828a083
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
ASoC: sn95031: Fix the number of options for Vibra controls
The VibraX On and Off times were incorrectly given 32 entries whereas hardware
describes only 16 entries.
This patch fixes the options to 16 entries only
Change-Id: I83d7cef9a6fb7584d2c8f9fc2efef18104447d95
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:30 +0000 (16:18 +0100)]
intel_sst: fix voice call regression
The pnw_osc_clk patch 10839 caused the voice call to break as this patch will
switch off the clock falsely even when any call is made for closing, the check
is wrongly made for idle detection.
This patch fixes by correcting teh check and fixing this issue
Change-Id: Iad54c8ea83d6c630a34439bd3c97010915641f99
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Fabien Barthes [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
intel_sst: ASoC: sst_platform: Ensure that Penwell osc_clk0 in ON during voice call
During voice call, SST driver is in suspend mode and ensure that osc_clk0 is
turned off. This clock is input to MSIC PLL
In order to enable voice call, the switching needs a clock source The audio
processing chip for voice call also needs this clock, so we should keep this
ON during voice call
This patch adds a function in sst driver to enable and disable the osc_clk0 and
it is done for voice and sst suspend.
Change-Id: Icc9f01c1a3780367f459cd50eb7f604a2a203027
Signed-off-by: Fabien Barthes <fabienx.barthes@intel.com>
Vaibhav Agarwal [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: Restore MSIC Audio PLLSRC to PLLIN after the voice call
Music playback is slow when switches from Voicecall. Also, some noise can be
observed after the phone call from the speaker.
For voice call, audio driver switches the PLLSRC to PCM1BLCK. This needs to be
switched back to PLLIN to enable the switching from voice call to music
playback.
This patch modifies PLL depending on the source.
Change-Id: Id7977c4672380f9e4c3017e576ac20f4fbc76eee
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@intel.com>
Abhay [Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: intel_sst: fix errors reported by klocwork
Variables in audio driver code need to be freed properly to avoid possible memory leaks.
Also the unchecked return of variables from called functions may cause out of bound errors
like in case of array indexes.
This patch fixes these errors (as pointed by the klocwork )in sst driver and ASoC code by
freeing the memory of unused variables and checking on the returned value by called function
to array index to avoid posible array out of bound runtime error.
Change-Id: I1710889976e0d257ba2e7bede338cc2f056ae095
Signed-off-by: Abhay <abhay.joshi@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
ASoC: sn95032: Fix the audio voltage rail configuration
The audio rail should be configured for Power save mode, as well as AOAC should
be set to power set mode. The off should be set for both configs as well
This patch configures the ON and OFF values as 0x2D and 0x24 respectively for
all audio rails
Change-Id: Ibc0e0d7409ec0508d168d992334981b02904ab7f
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
intel_sst: Restore the csr value after S3 and S0i3 states
The csr value is lost during S3 and the value was not restored
back completely after system resume.So, audio playback fails after
resume from S3
This patch stores the original value of csr before S3 and restores
it back on resume.
Change-Id: I80afeb939e4753f2baf05a0ad91b33ab4dc013a5
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Vaibhav Agarwal [Thu, 6 Oct 2011 15:18:28 +0000 (16:18 +0100)]
ASoC: sst_platform: check to ensure voice and music mutually exclusive
Voice call operates at 48khz and Music playback operates at 44.1khz.
Due to limitation in MSIC hardware, simultaneous voice and music
playback is not supported. MSIC does not support simultaneously
operating two PCM ports at different family of frequencies.
This patch adds a fix in audio driver to make sure that either
music playback or voice call is active at a given point.
Change-Id: Ia8e9a0e788c3d1ebc2588a69e612bf7f70ac6028
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
ASoC: sn95031: inte_sst: Fix for spurious long press event report bug
headset long press button, trigger too many long-press interrupts
and fault short-press interrupt.
This issue was found to be a hardware bug, and the workaround is implemented in
audio driver.when the button in the headset is pressed(long press i.e for more
than 2 seconds) and released, rain of long press interrupts followed by a
short press/long press event is observed after the button release.
This patch fixes the issue of spurious long press event report, followed by a
short press event, for every single long press, as a result of this patch only
one long press event will be reported for every long press.
Change-Id: I56812c9891729aae134559835a10126541e2dabd
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
intel_sst: Removal of Legacy pm registeration
Audio driver had legacy pm registerations which is not compliant
with the current RTPM Framework.
Audio driver had legacy_pm registerations in pci_driver structure,
this is no longer used. The suspend and resume call back is moved to
dev_pm_ops structure.Hence during driver registration the legacy pm
methods are not registered.
This patch removes the legacy_pm call back registeration from
the SST Driver.
Change-Id: I5225e1bfc35736efab27fe2562680eca1c0578cc
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Vaibhav Agarwal [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
intel_sst: Replace u64 with __u64 in intel_sst_ioctl.h
The user space applications have __u64 macro defined. So, to make
snd_sst_tuning_params structure definition in sync with user space macro,
u64 should be replaced with __u64
Replaced u64 with __u64 in intel_sst_ioctl.h
Change-Id: I68008a97d027562ea8004fbe1441868cd53e251e
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@intel.com>
Louis Le Gall [Thu, 6 Oct 2011 15:18:27 +0000 (16:18 +0100)]
intel_sst: Enable clk output for SSP0 and SSP1 to allow I2S master mode
Modification in sst driver probe to setup LPE SHIM register CLKCTL
and CSR to authorize SSP0 and SSP1 to output clock and use internal
clock.
Change-Id: I43a3e1ab58b366b1c9a3ff930a48387c2620eb41
Signed-off-by: Louis Le Gall <louis.le.gall@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:26 +0000 (16:18 +0100)]
ASoC: sn95031: mfld_machine: fix jack detection and removal issues
The hardware jack detect was implemented by board designers in such a way that
it relies on the AvP headphones to ground the driver-out signal. This was a
work around to be able to use the older style headset jack. The headset driver
then shorts the FET gate for the plug detect circuit to operate
Offset 0x26C bit 1 should be set high (grounded) at all times until just before
the headset is turned on
This patch fixes this by grounding headset normally. Also the jack interrupt
code reliability is improved by oring new interrupt value not overwriting
Change-Id: I2c01f40def7dfe5c3012a872d24f94c9a62a93a2
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:26 +0000 (16:18 +0100)]
ASoC: mfld_machine: remove the pins assigned to jack
The soc DAPM core turns off the pins associated with the jack when a jack removal
event is sent. We dont want the alsa DAPM to handle policy. Policy should be
decided by user space only
This patch removes the pins associated with jack and thus disabling any changes
done by DAPM while sending jack removal event
This patch thus resolve the issues of buffer timeout as pin and in turn whole
codec is turned off when jack removal event is sent
Change-Id: I1242d90b0bac94db54789c47db3999413d2c7434
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sn95031: enable the audio PLLEN bit of MSIC
Audio files plays at faster rate for 44.1khz streams. This is caused
because audio PLL of MSIC is not enabled. Penwell provides 19.2MHz,
which is at base rate of 48Khz. PLL has to be enabled for streams which
are not at 48KHz base rate.
This patch enables the audio PLL for all the use cases which includes
voice and music use cases.
Change-Id: Iccb1b502eaa32fb963f7cf9a013a3ac8f08d7c02
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sst_platform: Error handling for stream allocation failure
This patch fixes the error handling for stream allocation failure
in platform driver.
Change-Id: Iadc39a1a027964d410ddf308a78c6578aac3f6fd
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sn95031: use GPADC driver to read the mic bias value
This patch enables the codec driver sn95031 to read the mic bias value through
GPADC driver.
Change-Id: Iacd16563ad8fb5cba0bd0784161a2ed0be2e26de
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:25 +0000 (16:18 +0100)]
ASoC: sn95031: set default gain to -2dB in MSIC
When VHS is programmed to 1.2v, the gain beyond -2dB causes
clipping in the output signal. Recommendation is to set the hardware
volume levels -2dB for both HS and IHF paths.
Change-Id: I67acb607f4384c337c4abb3d0eb00442c917301c
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
ASoC: sn95031: fix to avoid spurious jack interrupts
When jack insertion is detected, jack detection interrupt is disabled to avoid
spurious interrupts. Jack detection interrupt will be re-enabled when jack
removal is detected.
Change-Id: Ie43a0e881beb03e657e441cd801f5c84ba6768b7
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
intel_sst: mono to stereo capture support in driver
Middleware detects headset insertion and invokes driver IOCTL
to perform mono to stereo. Audio driver will send IPC message
to audio firmware to perform the task.
Change-Id: I551ea2f2ef35271ed1186940ea6309dccf8b9241
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:24 +0000 (16:18 +0100)]
ASoC: sst_platform: remove hardcoding for voice dai checks
This patch removes hard coded value for checking the
voice dai. It uses run time data to differentiate the voice dai.
Change-Id: I3064f8e3039014764a23ba4c65e76a40d7f6b10c
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
bingx.deng [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
ASoC: sn95031: Add headset detection code in new soc dirver
It use switch driver to report headset insert/remove event.
Change-Id: I482da8d5982acf0c822e99c983e1437140f350d4
Signed-off-by: bingx.deng <bingx.deng@intel.com>
Dharageswari R [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
intel_sst: Fix firmware download failure post S0i3
This patch saves the csr register value during suspend, restores it back in
resume and fixes the firmware download failure post S0i3
Change-Id: If60b1d209b3e3e3db7c4403387c0d8e5f54111e1
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
intel_sst: update the driver version
Change the driver version to 2.0.01. This driver version implements
dynamically handling OSC_CLK0 during RTPM, in addition to other RTPM changes.
Change-Id: Ib4717e76df16139489d6aa7ff7a99234e6127d7f
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:23 +0000 (16:18 +0100)]
ASoC: sn95031: mfld_machine: Enable SPI Vibra controller
This patch adds the TI codec driver changes for supporting the SPI control mode
for the Vibra devices. The PCM vibra path is also removed.
Change-Id: I838389f6a53a4347a14b22876e83bb6ea301abfa
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: sn95032: hardware volume and mute controls for sn95038 codec driver
This patch adds alsa mixer digital volume controls to headphone and spekaer
paths. Application can control left and right volume individually for each
path.
Change-Id: I514ee1a6f72fde1db53721198a190a17c1150bab
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: sn95031: sst_platform: set_params support in sn95031 codec and sst platorm
This patch configures sn95031 codec to 24 bit word format.
Codec driver implements set_params and platform driver
Change-Id: I303d7550a531903c637fa31be1bf0aa9c9585747
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:22 +0000 (16:18 +0100)]
ASoC: sst_platform: intel_sst: Audio fix the runtime PM bug when stop media is called
During stop media, the driver usage count remains 1, this cause the device to
not get suspended. This patch ensure that force close of media service which
makes a direct free to call to driver doesnt cause runtime counter to incremenat
and device goes to suspend when idle
Change-Id: I7c01baf04eacffa61a2251972ec336e83c1b433f
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: sn95031: voice call support in codec driver
This patch enables PCM1 port of MSIC. The codec driver will
have it's own dai, hence there will be new device "Voice" for
this sound card.
Change-Id: Ic21163d2731bd8df10759062687dee952a8b4243
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: sst_platform: intel_sst: fix the runtime pm when stream is kept open
This patch does intelligent idle detction in driver and suspends LPE when not
in use.
Change-Id: Ib600b6f8b0ad0609cd3bbf3560f7b0754a413fb8
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: mfld_machine: add voice dai support in mfld machine driver
This patch adds support voice dai in machine driver.
Change-Id: I77356d4eeb7fcca5304fc109cd6d409d0ffc453d
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:21 +0000 (16:18 +0100)]
ASoC: sst_platform: voice call support in platform driver
Voice dai insided the platfor driver is a dummy dai. It doesn't have
any standard alsa dma capabilities. Voice dai only supports open, close and
set_params alsa apis.
Change-Id: I508d9ebca777ef3e23659e11b881fa4b52d5de41
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Ramesh Babu K V [Thu, 6 Oct 2011 15:18:20 +0000 (16:18 +0100)]
intel_sst: control penwell OSC_CLK_OUT0 clock during suspend/resume
This patch disables/enables the OSC_CLK_OUT0 during suspend/resume.
OSC_CLK_OUT0 is connected to MSIC PLLIN and it needs to be
disabled during audio suspend to get low power numbers.
Change-Id: I83b43cc24e6ff1c21270403b5cc771714f3d8e7c
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:20 +0000 (16:18 +0100)]
ASoC: sst_platform: add 16bit, 44.1K support in audio
Change-Id: Iebb065a2351544f63dcc72e44bf3c8fd945069f8
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:20 +0000 (16:18 +0100)]
intel_sst: ASoC: sst_platform: fix the changes required for asoc driver interface to work
This patch changes the sst driver not to call the old sound card ops during
playback and other operations
Change-Id: If399630e12c8bfd75dbc8a938918a93eacccb2cc
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Dharageswari R [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
intel_sst: Fix for First audio playback through media player
This audio driver fixes the following issue:
Cannot play the music and appear the error of .W/AudioTrack( 1233):
obtainBuffer timed out.
Change-Id: I0f12d74f0f3ecb49fc6928986919308f4b005d73
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
intel_sst: Addition of pcm delay field
This audio driver patch includes the addition of pcm_delay field for
the Audio Video sync.
Change-Id: I225a2068737efebf2484b0ea63e3a261e0047141
Signed-off-by: Dharageswari.R <dharageswari.r@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Vinod Koul [Thu, 6 Oct 2011 15:18:19 +0000 (16:18 +0100)]
ASoC: mfld_machine: fix the asoc sound card list initialzation
This initilzates the sound card soc list initialization
Change-Id: Iaa529d6437658598975bb3aa39806ab477ab0191
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Dharageswari.R [Thu, 6 Oct 2011 15:18:18 +0000 (16:18 +0100)]
intel_sst: 16-Bit and 44.1 frequency support
This patch includes the audio driver support for 16 bit and 44.1
frequency only.
Change-Id: I425edbd3ad620403d1b9350ae03f7a6a452fbc5e
Signed-off-by: Dharageswari.R <<dharageswari.r@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Dharageswari R [Thu, 6 Oct 2011 15:18:18 +0000 (16:18 +0100)]
x86, mrst: add ASoC platform devices and audio resources
This patch makes LPE to run with 50MHz with SCU FW support.
Change-Id: I92ab06da7c22b123f084302b01a467e6221d4d48
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Feng Tang [Fri, 8 Jul 2011 08:59:26 +0000 (09:59 +0100)]
sst: avoid unnecessary firmware reloading for MRST
SST HW on MRST doesn't need to reload the firmware during suspend/resume
cycle, so remove the extra workload. This also fix a bug that the firmware
sample rate can't be modified when there is no active playback/capture
stream.
Change-Id: If8159e1100824b5d96afec9952d5f9960d365f4c
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lu Guanqun [Fri, 8 Jul 2011 08:59:10 +0000 (09:59 +0100)]
sst: report correct jack event
The status of jack event is compared bitwise:
[in sound/core/jack.c:snd_jack_report()]
for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) {
int testbit = 1 << i;
if (jack->type & testbit)
input_report_switch(jack->input_dev,
jack_switch_types[i],
status & testbit);
}
So in order to report the correct events, 3 should be passed instead of 1.
Change-Id: I8a0d8c959340fab44acd11ed46dc4c763a493b36
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Liam Girdwood [Tue, 7 Jun 2011 15:08:33 +0000 (16:08 +0100)]
ASoC: core - Optimise and refactor pcm_new() to pass only rtd
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.
Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.
Change-Id: I46fa671e8ccca581475699366b687461435ac5aa
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Andre Bartke [Tue, 31 May 2011 19:03:56 +0000 (21:03 +0200)]
staging: intel_sst: Fix memory leak
In case of an error stream_bufs is not freed here.
Change-Id: I048acbc8761f7cb718752cf4215ab64553042e08
Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fei Yang [Tue, 25 Oct 2011 00:12:16 +0000 (17:12 -0700)]
WATCHDOG: Enable intel_scu_watchdog driver, otherwise the firmware would
reset the cpu approximately every 75s. This is a copy from UMG K35 kernel
tree, up to the following commit
commit
8ec47127745d548a591db2308f58a5ceeb4599c9
Author: mgross <mark.gross@intel.com>
Date: Tue Oct 4 12:24:20 2011 -0700
watchdog: detect spining in kernel and treat them as softlock ups
BZ: 10041
Updated watch dog to detect soft lock ups and provide WARN data to help
debug soft lock ups in drivers that don't wedge the system so much that
the watch dog stops getting kicked.
The works by computing the amount of system time between the SCU warning
interupt and the SOFT_LOCK_TIMEOUT which is 10 seconds. If the system
time on any cpu is within 10ms of the duration of the sample time (about
10 sec in jiffies) then we assume that CPU has a driver wedge and needs
to be reset. It calls panic to get the trace data logged to the emmc
panic area.
Change-Id: I2b4a5bff99bae86f7431f28d161b57973774ea0a
Reviewed-on: http://android.intel.com:8080/20482
Reviewed-by: Allyn, Mark A <mark.a.allyn@intel.com>
Tested-by: Allyn, Mark A <mark.a.allyn@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Mangalampalli, Jayant <jayant.mangalampalli@intel.com>
Change-Id: Ib91d869741681ffb0190a2b57056192705b03687
Signed-off-by: Fei Yang <fei.yang@intel.com>
sathya [Tue, 25 Oct 2011 01:38:14 +0000 (18:38 -0700)]
hsu with pm
Change-Id: Iae0bd31900f9d8987ec48ecd04835b02003efaae
Chuanxiao Dong [Fri, 21 Oct 2011 01:53:53 +0000 (09:53 +0800)]
mmc: core: remove mmc bus legacy suspend/resume method
BZ: 4379
MMC bus suspend/resume was using legacy method. In system entering
S3 patch, the suspend/resume function cannot be called since MMC
bus also implemented the new suspend/resume method. So if dev_pm_ops
is defined but .suspend/.resume callbacks are not, then mmc_queue will
not be suspended/resumed
This patch will remove the legacy suspend/resume method and change to
use the new method totally.
Change-Id: I1dea4901910874f853fcb4e4c412e91df47a34d0
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 10:54:15 +0000 (18:54 +0800)]
mmc: core: resolve dead lock problem in pm_notify
BZ 2106
when pm_suspend() is called, in mmc_pm_notify() it will call mmc_claim_host(),
in host->bus_ops->remove(host), that is mmc_sd_remove(), at last it will
call mmc_cleanup_queue(), suspend thread will wait the mmcqd/2 thread to stop,
but in mmcqd/2 thread, mmc_blk_issue_rw_rq() will call mmc_clain_host(),
mmcqd/2 thread will wait in mmc_clain_host(), it will cause dead lock.
Change-Id: I05462d71066c4182ab01934fe64a87957ab47c6a
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 10:51:36 +0000 (18:51 +0800)]
mmc: remove legacy PM method for MFLD SDHCI host driver
BZ 1707
PCI core only prefer one of legacy PM and new PM. And we need to implement
runtime pm, we have already been using new PM method, so remove the legacy PM
method.
Change-Id: I67e042f283005e1b136d22735998b3be10dd5ce9
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 10:00:25 +0000 (18:00 +0800)]
REVERTME: mmc: sdhci: set SD_CD_PIN alternate function
With runtime pm enabled, SD detection should be enabled by
changing GPIO_ANO_69 alternate function to be normal.
This configuration cannot be done kernel. This should be done
by IFWI in very earlier state.
So the final change should be in IFWI(e.g. xml setting file) but
not in kernel. Before IFWI is ready, we keep this HACK.
Change-Id: Ief20c3aa686c62d41389afb7aed4bf1aad950889
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Chuanxiao Dong [Thu, 20 Oct 2011 09:36:53 +0000 (17:36 +0800)]
mmc: core: calculate the max_discard_to for all mmc card
To support erase/trim feature, MFLD host need a suitable
max_discard_sectors. Currently, if not enable ERASE_GROUP_DEF,
then driver will choose pref_erase which is not suitable for
MFLD host.
MFLD host still need driver to calculate a correct max_discard_sectors
but not directly use pref_erase. This patch will help to do so
Change-Id: I29a82bfcefa948e7e698a2170e30a2639bf954c3
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Adrian Hunter [Mon, 3 Oct 2011 12:33:34 +0000 (15:33 +0300)]
mmc: sdhci-pci: add runtime pm support
Ths patch allows runtime PM for sdhci-pci, runtime suspending after
inactivity of 50ms and ensuring runtime resume before SDHC registers
are accessed. During runtime suspend, interrupts are masked.
The host controller state is restored at runtime resume.
For Medfield, the host controller's card detect mechanism is
supplanted by an always-on GPIO which provides for card detect wake-up.
Change-Id: I0c054e7591f017b81f6efe3637ed870ae8253910
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Chuanxiao Dong [Wed, 19 Oct 2011 10:28:34 +0000 (18:28 +0800)]
mmc: core: move->request() call from atomic context
mmc_request_done() is sometimes called from interrupt or other atomic
context. Mostly all mmc_request_done() does is complete(), however it
contains code to retry on error, which uses ->request(). As the error
path is certainly not performance critical, this may be moved to the
waiting function mmc_wait_for_req_done().
This allows ->request() to use runtime PM get_sync() and guarantee it
is never in an atomic context.
Change-Id: I9a13ec8f6d41b7fef8497dd7c2e794bb32585cd6
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Adrian Hunter [Fri, 23 Sep 2011 09:48:21 +0000 (12:48 +0300)]
mmc: block: support no access to boot partitions
Intel Medfield platform blocks access to eMMC boot partitions which
results in switch errors. Since there is no access, mmcboot0/1
devices should not be created. Add a host capability to reflect that.
Change-Id: I95d4c3788e8890d117b58bd36a449e2d9e35dd68
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:15 +0000 (16:42 +0300)]
mmc: block: add eMMC hardware reset support
For cards that support hardware reset (just eMMC), try a reset and
retry before returning an I/O error. However this is not done for
ECC errors and is never done twice for the same operation type
(READ, WRITE, DISCARD, SECURE DISCARD) until that type of operation
again succeeds.
Change-Id: I779d4d49a868a41bb058f58dc558a06934658b53
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:13 +0000 (16:42 +0300)]
mmc: sdhci-pci: add eMMC hardware reset support
Implement eMMC hardware reset for Medfield.
Change-Id: If76373ca36d63d19ae64c9a7303be511c75dec0d
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:12 +0000 (16:42 +0300)]
mmc: sdhci: add eMMC hardware reset support
Add an SDHCI operation for hardware reset and connect it to the
host controller operation.
Change-Id: I5d855aa804f09d9faccf9da799551e1abb079a5e
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Adrian Hunter [Mon, 29 Aug 2011 13:42:11 +0000 (16:42 +0300)]
mmc: core: add eMMC hardware reset support
eMMC's may have a hardware reset line. This patch provides a
host controller operation to implement hardware reset and
a function to reset and reinitialize the card. Also, for MMC,
the reset is always performed before initialization.
The host must set the new host capability MMC_CAP_HW_RESET
to enable hardware reset.
Change-Id: I7658376627faf36f1e02e98df1ef9cc414e5b2cd
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Chuanxiao Dong [Wed, 19 Oct 2011 09:53:23 +0000 (17:53 +0800)]
Revert "sdhci: Add runtime pm support for sdhci-pci"
This reverts commit
58b9f466b5a0f6d4324c433d2e450d7a4a92a697.
Change-Id: I1e990a7774820343d0aee445b5e649bb78c37d8f
Chuanxiao Dong [Wed, 19 Oct 2011 09:48:15 +0000 (17:48 +0800)]
Revert "sdhci: correct clk_gate runtime_pm init"
This reverts commit
e82e08ed17110e6ab73fc9c5b9a74cd93e2a6c37.
Change-Id: I2f2e612b6e4e03937f73e0d4406830ff802a0f65
Chuanxiao Dong [Wed, 19 Oct 2011 09:47:54 +0000 (17:47 +0800)]
Revert "mmc: sdhci: don't try to do anything during power off"
This reverts commit
80b9b1a37fb230dd03716669ee24c5ad0631880f.
Change-Id: Icb1f392eb2b667f4b9c77315233b9a4708a327b5
Chuanxiao Dong [Wed, 19 Oct 2011 09:47:35 +0000 (17:47 +0800)]
Revert "MMC: Merge two patches from UMG 2.6.35"
This reverts commit
c435aacac11c4c54e45ad25a8dea6d81d7f5e835.
Change-Id: Icc5525c3d432868c2e36e2d0cc639c7919f8b953
German Monroy [Mon, 17 Oct 2011 23:32:28 +0000 (16:32 -0700)]
config: enable optimize inlining
without this... android's init process crashes!!!
Need to find out why
Change-Id: I722dee36a86944cf9d39681a84a0fdb81b933e62
German Monroy [Thu, 13 Oct 2011 19:51:52 +0000 (12:51 -0700)]
merge of related commits
config: bring from Mark and Fei's commit
dc0d78f4
config: non relocatable + start addresses
Change - Id: I35f8dcdd5805b3724bb1cc4387662c638791bdee
config: enable adb, disable eth gadget
Change - Id: I03c9ad343af9bb164c8d0190f6fb4d5773e5960c
Change-Id: I7b0e05aa0abb64ba5bd4ff1c5324bbc9e02044e2
German Monroy [Fri, 30 Sep 2011 00:39:30 +0000 (17:39 -0700)]
merge of reated changes
kernel build: add Android makefile
So that this kernel can be compiled together with the rest of Android
(i.e. build automatically creates boot.bin)
Change-Id: I7f59d0d17ed267e101f0cee2f75a5893de5cfbcb
kbuild: add a make defoldconfig make option
The oldconfig option is asking user to choose when new config options are defined in KConfig files, and not in .config
This prevents automatic builds.
This make target will use default values for all options not specified in .config
xxChange - Id: I713a5cc248130056441060dccfcb492ad0d8acb5
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Change-Id: I5f12ca9bc66ba7ac54bc205319c23d2875c0ea6f
Fei Yang [Thu, 6 Oct 2011 23:27:37 +0000 (16:27 -0700)]
USB: Merge the following changes from UMG 2.6.35 tree
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
commit
6a9f1076fde6cbcac68d51efe0bf8c8776d57f42
Author: jzhuan5 <jin.can.zhuang@intel.com>
Date: Fri Sep 16 17:03:33 2011 -0400
usb: langwell_udc: protect access to ep->desc and clear Auto low power featu
BZ: 9110
Two issue fixed:
1. When langwell_ep_queue is being called, there could be interrupts, then e
is set NULL, after returning from interrupt, langwell_ep_queue() calls queue
which will access ep->desc without checking it, this leads to NULL pointer k
The patch adds lock protection to ep->desc to avoid this.
2. The auto low power feature is causing fabric error when calling langwell_
in some extreme timing situtation. In this bug, langwell_ep_disable() is cal
after bus suspend is received by device controller. If auto low power featur
PHCD bit will be set by controller automatically. Then, langwell_ep_disable(
fabric error.
Since langwell_udc driver has not utilized this feature, this patch simply d
Change-Id: Ia95d9ee9dee22c19e55f046b62a864a2fb4bd084
Signed-off-by: jzhuan5 <jin.can.zhuang@intel.com>
Reviewed-on: http://android.intel.com:8080/18772
Reviewed-by: Yin, Fengwei <fengwei.yin@intel.com>
Tested-by: Yin, Fengwei <fengwei.yin@intel.com>
commit
cfbe81d988a2201ca0a02fa33481f0f014cab3ab
Author: Wu, Hao <hao.wu@intel.com>
Date: Thu Sep 1 22:24:24 2011 +0800
usb/penwell_otg: increase ulpi access timeout
BZ: 7272
This patch increase the timeout for each ulpi access via
PNW USB controller to MSIC ULPI registers, to increase
tolerance for bad case.
Change-Id: I5ee9769ba990f591744d08e4fc2147037f57fab6
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Reviewed-on: http://android.intel.com:8080/17034
Reviewed-by: buildbot <buildbot@intel.com>
Reviewed-by: Yin, Fengwei <fengwei.yin@intel.com>
Tested-by: Yin, Fengwei <fengwei.yin@intel.com>
commit
02bbb3bf258225f59fcd4f28827ae77d817db2d6
Author: jzhuan5 <jin.can.zhuang@intel.com>
Date: Thu Sep 1 16:38:58 2011 -0400
usb: client: Fix the issue of test mode fail in TEST_PACKET
BZ: 8285 8779
PET sends set_feature request to enable USB client to a state of TEST MODE.
After the completion of status stage, USB client should enable TEST MODE by
programming PORTSC1 register. Also stop TEST MODE after USB device power
cycle according to USB Spec.
Change-Id: Ie973dabd227ddde6fdbea30e55866ee07b9bb884
Signed-off-by: jzhuan5 <jin.can.zhuang@intel.com>
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Reviewed-on: http://android.intel.com:8080/17146
Reviewed-by: Yin, Fengwei <fengwei.yin@intel.com>
Tested-by: Yin, Fengwei <fengwei.yin@intel.com>
commit
87f8a45120ee13c30100d687499be97c6d31bf04
Author: Yu Wang <yu.y.wang@intel.com>
Date: Fri Aug 26 17:14:19 2011 +0800
usb: langwell_udc: fix flush ep met fabric error.
BZ: 7888
When UDC flush ep, sometimes system met fabric error. The root cause is
before flush ep, PHY would exit low power mode. And there is a latency
in HW did this operation, if driver access UDC during this latency,
system will meet fabric error.
This patch add 3 millisecond delay to ensure the PHY HW exit low power
mode, then operate UDC.
Change-Id: I39992616c58e3c89789830413a323439ba785764
Signed-off-by: Yu Wang <yu.y.wang@intel.com>
commit
d4252773bed09a139437efc975c78b1d684c527e
Author: jzhuan5 <jin.can.zhuang@intel.com>
Date: Fri Aug 26 12:00:58 2011 -0400
usb: otg: Disable MSIC interrupt when system is shutting down
BZ: 7832
This patch implements shutdown callback of penwell_otg driver.
The shutdown callback disables MSIC interrupts to prevent from
disturbing the process of system shutdown.
Signed-off-by: jzhuan5 <jin.can.zhuang@intel.com>
Change-Id: I3de7f54d09b5b9b06304775403115e5932b28b72
commit
14a840ae3eb1d4d7dc886e332abd8afb0840633d
Author: Wu, Hao <hao.wu@intel.com>
Date: Tue Aug 16 01:44:35 2011 +0800
usb/penwell_otg: fix PD_DCP detection compliance Test issue.
BZ: 4360
This patch add 1ms sleep between Primary and Secondary Detection,
and assert VDPSRC when DCP detected and attached. This resolved
BC1.2 compliance test case PD_DCP issue.
Change-Id: I9cf3b71e33a795748702a3cf582b8fa51abc6a11
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
1c3d68c874898e90442c2dfb541c8dd2397a3749
Author: Wu, Hao <hao.wu@intel.com>
Date: Wed Aug 3 04:00:10 2011 +0800
usb/langwell_udc: fix some issue to avoid blocking into D0i1.
BZ: 6378
This patch is from Borqs, resolve issue if ep flush timeout, then
USB D0i1 state will be blocked.
Change-Id: I9697cc2c310db20b337e8dd9032f1eb951a0f2e5
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
63e1d6fa995a95991b668d34126017629909099c
Author: Wu, Hao <hao.wu@intel.com>
Date: Fri Jul 29 19:02:15 2011 +0800
usb/penwell_otg: manual charger detection flow
BZ: 2921
This is a SW workaround for a hardware issue which cause charging
failure, using manual charger detection flow instead of original one
to avoid this hardware issue.
Please note that the new flow using ULPI, only works on PNW C0 or later
version.
Change-Id: I1941c2dd7364b13b7354995f0eb5a3a6ec2da402
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
1ad65047b445da5455da82b8b05b168516979b56
Author: Wu, Hao <hao.wu@intel.com>
Date: Thu Jul 28 02:45:12 2011 +0800
usb/penwell_otg: enable OTG_VBUS_OFF test mode for compliance test
BZ: 5895
This patch enabled OTG_VBUS_OFF test mode in driver for USB OTG 2.0 complian
case CT_A_CAP (OTG Compliance Plan 8.1.2 A-UUT Bypass Capacitance).
Change-Id: I07891cb9d1138e620361b30c7d894b0f5f4dfec4
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
105bf83d769f9b5a4fc13287595080a236df4ece
Author: Wu, Hao <hao.wu@intel.com>
Date: Fri Jul 15 03:50:30 2011 +0800
usb/penwell: fix incorrect charging current when USB is in unconfigured sta
BZ: 5146
This patch is for USB OTG2.0 Compliance issue, after a USB reset, USB will
be back to unconfigured state, then only can draw less than IB_UNCFG max
(2.5mA) current from connected SDP. This patch add related action triggered
by USB reset event.
Change-Id: I4d325de485e468b0bd808c0ccebc2aadea95768c
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
03da966f597139a67f7644a7b17631d06cda5c5e
Author: Yu Wang <yu.y.wang@intel.com>
Date: Thu Jul 14 16:57:14 2011 +0800
usb: langwell_udc: fix pull up USB met fabric error issue.
BZ: 5087
After enabled the "USB tethering" from Android settings application,
pulled up USB cable, board would meet fabric error. The root cause is
after pulled up USB cable, UDC would go to D0I1 mode. And Android
framework would find USB cabled was disconnected, then wrote zero to funtion
enable interface of sysfs. But this sysfs interface hadn't resume UDC to D0
mode before operated UDC HW, then met fabric error.
This patch fixes this issue by resume UDC from DOI1 before operating HW
in langwell_pullup function.
Change-Id: I9b7c698afec79f0ef355c3053ef9538e8b9dd4e6
Signed-off-by: Yu Wang <yu.y.wang@intel.com>
commit
ed3cd9c69c33d5a70f4918e8822413dd95001007
Author: Wu, Hao <hao.wu@intel.com>
Date: Wed Jul 13 02:29:45 2011 +0800
usb/penwell: add SRP test mode support
BZ: 4974
This patch is for SRP Test mode support, please refer to USB OTG 2.0
Spec 6.4.3, OTG Compliance Test 6.3.4.
Change-Id: Iaba1d89b79c28862a0239c0cf5cc57a00fef8e8c
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
b49721682faf6a42aecbddfa71ebb10d537cf661
Author: Jiebing Li <jiebing.li@intel.com>
Date: Fri Jul 1 04:10:08 2011 +0800
usb: langwell_udc: fix pull-up enable issue in langwell_pullup()
BZ: 4154
Sometimes USB host sends bus_suspend request to device due to
some reason. When device receives the request, PHY will be put
into low power suspend by device driver. If at this time
langwell_pullup() is called by gadget driver to set USBCMD
Run/Stop bit, the pull-up on D+ will not be enabled as expected.
This patch fixes the issue by exiting PHY low power in langwell_pullup().
Change-Id: I1b9836f57e0a25e16eeaa31b3c4319e811a542ad
Signed-off-by: Jiebing Li <jiebing.li@intel.com>
commit
2e1aa820ecc706cde4798ead132629b276bcc84f
Author: Hao Wu <hao.wu@intel.com>
Date: Mon Jun 20 10:43:42 2011 +0800
usb/penwell_otg: enable timer ta_wait_bcon for wait connection state.
BZ: 4357
After USB A-cable is inserted into OTG port, USB driver will enable
Host stack and VBUS power supply, then wait device to connect. Per
spec, enable the wait timeout as 15s (< 30s max).
This is for OTG2.0 Compliance Test: 6.2.2 A_UUT Power up Test.
Change-Id: I4a9ae8c23c26aabb461fa7c5c77b9057cbe6290d
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit
1163dcda8ec382b08299bf09d01f1f76ba977da7
Author: Hao Wu <hao.wu@intel.com>
Date: Mon May 30 20:33:41 2011 +0800
usb/langwell_udc: hold wakelock when USB is connected and not suspended
BZ: 2824
This patch enable USB udc driver to hold wake lock when USB is connected
and usb bus is active state. This will prevent system from trying to enter
S3 when usb is still alive.
Change-Id: Ibc2ae6a985ea6d9168265c3ce4227f4a4309eba4
Signed-off-by: Hao Wu <hao.wu@intel.com>
commit
500c0f18a30a222620027446294d913fa3e9a60e
Author: Shanyu Zhao <shanyu.zhao@intel.com>
Date: Tue May 17 15:31:55 2011 -0700
USB: Fix commanded stall feature in the device controller
BZ: 2314
usbtest TEST CASE 13 - endpoint halt feature fails. Commanded stall
occurs when host explicitly calls the endpoint's halt feature.
The set_halt function at the gadget side will not halt theendpoint
if the queue is not empty. Therefore when the host calls the
halt feature for some gadget function such as the gadget zero, which
always put a usb_request in the queue, the halt always fails.
To fix the failure, for commanded stall don't check for the queue.
Also when reset the endpoint the halt flag shall be cleared manually.
Change-Id: I1f5789a4c8115d46c800ee5b808141cab9c2da20
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Jiebing Li <jiebing.li@intel.com>
commit
acb6ef93331fb854408ba0748e26ae6e18c0b653
Author: Shanyu Zhao <shanyu.zhao@intel.com>
Date: Tue May 17 14:39:52 2011 -0700
USB: disable HW zero length termination for device control endpoints
BZ: 2767
Since the control endpoints know the expected number of bytes in a
transaction, zero length termination (zlt) is not needed. If enabled
the device controller would wait indefinitely for the USB host to send
an zero length packet which never happens.
This fixes the failure of the usbtest TEST CASE 14.
Change-Id: Ib31f2c6dd87b60c669c265bb87afbead056d536f
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
commit
35eaa2fdf470e9b6bf922ba67ca5ca48fdb8bfd1
Author: Hao Wu <hao.wu@intel.com>
Date: Fri May 6 13:26:25 2011 +0800
usb: penwell_otg: use separate suspend/resume functions for D3
BZ: 1424
This patch updated penwell_otg driver to use separate resume/suspend
function for D3 instead of reuse runtime pm functions, they contain
more state machine handling for USB D3 state, including PHY Low
power mode setting, timer delete and state transition. It resolved
unstable issue caused by incorrect handle on USB states and events
when D3 suspend/resume.
Change-Id: I94d395a2851b5cfda0c8e2dd49ebd83c92e6aa83
Signed-off-by: Hao Wu <hao.wu@intel.com>
commit
e29a44d2438cd13521af9b36719f00ebe8527593
Author: Sundar Iyer <sundar.iyer@intel.com>
Date: Mon Apr 25 18:53:52 2011 +0530
usb/penwell_otg: use dev_pm_ops interfaces for D3 suspend/resume.
BZ:#1378/#1301
This patch updates the penwell_otg to use .suspend/.resume in the dev_pm_ops
interface instead of the legacy pci driver suspend/resume functions.
This patch also removes duplicate pci related opeartions in suspend/resume
functions.
Change-Id: I66f2bf841979bc40787d3b3b884583c7b30511d8
Signed-off-by: Sundar Iyer <sundar.iyer@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
commit
6e2bf9dc73b990dc693ed6413d2f7ddc33df8615
Author: Jiebing Li <jiebing.li@intel.com>
Date: Tue Apr 19 15:37:46 2011 +0800
usb: langwell_udc: fix cable unplug issues
BZ: 1001
This patch fixed stop USB peripheral stack issue after received unplug event
Two issues are fixed in this patch:
1. add dtd_pool pointer check in order to avoid dtd pool free error
2. remove PHY low power set in order to avoid EP flush timeout
Change-Id: Ib259268cdffcb0ad30a19dd3258992efe63720cb
Signed-off-by: Jiebing Li <jiebing.li@intel.com>
commit
9e6b9018a137bb68d8c55bcd9a9096a1134693d3
Author: Hao Wu <hao.wu@intel.com>
Date: Tue Apr 19 14:59:34 2011 +0800
usb: penwell_otg: fix missing unplug USB cable event.
BZ: 1001
This patch is for BZ1001, mainly solve missing unplug USB wall charger
(DCP) event when USB is in D0i3 and charging from DCP.
Main change in penwell_otg:
- Use PNW USB OTGSC status register to check wakeup event.
- Ensure mode is set and PHY is in low power mode before enter D0i3
- Remove duplicate PHY low power mode setting.
Change-Id: I4c842a7b8a10332360b7b7695139666870094284
Signed-off-by: Hao Wu <hao.wu@intel.com>
commit
c2846926367114bead0e6cd0f1b4dff6fc6a121f
Author: Hao Wu <hao.wu@intel.com>
Date: Fri Apr 15 11:36:30 2011 +0800
usb: penwell_otg: fixing SRP failure.
Fixing patch for Sighting 3742776: SRP failed
Change-Id: I64b9446b7ba8b5e87b1e95e87ea20b2682c071f4
Signed-off-by: Hao Wu <hao.wu@intel.com>
commit
3f35456f90c7ff997e078cc9083cfefda4bc4f02
Author: Jiebing Li <jiebing.li@intel.com>
Date: Thu Mar 10 16:56:26 2011 +0800
runtime PM mode change in gadget unregister operation
put usb client to D0 mode in gagdet unregister operation and put it
back to D0i3 after the operation done
Change-Id: Ib8fe33f9f46947ed4a9e26458db75f2ae16318d3
Signed-off-by: Jiebing Li <jiebing.li@intel.com>
commit
d17c4c027c5c8e0e2e42d9c637cf4452c204b443
Author: Jiebing Li <jiebing.li@intel.com>
Date: Fri Aug 20 13:49:09 2010 -0700
linux-2.6.36-usb-penwell-otg-add-aca-device-support.patch
commit
80900b4c8976ec78b12393d64244e2f186998736
Author: Hao Wu <hao.wu@intel.com>
Date: Fri Aug 20 13:49:09 2010 -0700
linux-2.6.36-usb-penwell_otg-HACK-resume-controller-before-reg-access.patch
commit
f5ec09219efa41149a38930e84cd77dd402ed9dc
Author: Hao Wu <hao.wu@intel.com>
Date: Fri Aug 20 13:49:09 2010 -0700
linux-2.6.36-usb-penwell_otg-add-phy-config.patch
commit
ede32384e6a8021d6fa9627ead3ac378bafe60e7
Author: Hao Wu <hao.wu@intel.com>
Date: Fri Aug 20 13:49:09 2010 -0700
linux-2.6.36-usb-penwell_otg-update-otg-state-machine-for-runtime_pm.patch
commit
7f1584ff3eac1fa4c01762c071c0b5bdeaba0da9
Author: Hao Wu <hao.wu@intel.com>
Date: Fri Aug 20 13:49:09 2010 -0700
linux-2.6.36-usb-langwell_udc-add-runtime-pm-support-for-otg.patch
Change-Id: I06a291cee179b1efe450eadf96e278434246742a
Illyas Mansoor [Tue, 17 May 2011 21:48:21 +0000 (03:18 +0530)]
pci_quirks: adding D0i1 in usb hsu and D0i2 in sep
BZ: 2280
currently USB, HSU don't have d1_supported flag set in pm capabilities
register, hence the D0i1 to D0i0 transition is prevented by
the pci framework. Also d2_supported flag is not set for sep.
This needs to be fixed in the IA FW, till then we add pci quirks
to fix this.
Change-Id: Ib4f1937896dc569472e7dd0dfbd7389f95ce80fd
Signed-off-by: Illyas Mansoor <illyas.mansoor@intel.com>
Fei Yang [Tue, 4 Oct 2011 16:46:59 +0000 (09:46 -0700)]
PMU: register choose_state fucntion for MID PCI platform ops with
pmu_pci_choose_state() implemented in the pmu driver.
The following limitations apply to Medfield SoC,
LSS_04: SECURITY supports only D0i2
LSS_06: USB OTG supports only D0i1
LSS_07: USB HOST supports only D0i1
LSS_41: HSU supports only D0i1
Change-Id: I9ddcd198a3eed09efd7be307e8bc6fefa96e3a59
Signed-off-by: Fei Yang <fei.yang@intel.com>
Kristen Carlson Accardi [Fri, 26 Aug 2011 10:55:08 +0000 (11:55 +0100)]
penwell_otg: enable runtime_pm
runtime_pm was already implemented, but not enabled at probe.
Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Kristen Carlson Accardi [Thu, 25 Aug 2011 11:20:33 +0000 (12:20 +0100)]
langwell_otg: enable runtime pm at probe time
decrement the usage count at probe time and enable runtime pm.
At remove time, prevent runtime pm by incrementing usage count
and forbidding runtime pm.
Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Fei Yang [Fri, 23 Sep 2011 17:22:40 +0000 (10:22 -0700)]
SCU_IPC: Found the following patch is needed as mmc driver is getting probed
before intel_scu_ipc driver, thus intel_scu_ipc_command returns -ENODEV. Also
cleanup one compilation warning in intel_scu_ipcutil.c
commit
91c2605a6c2d4098ef2cefca8e3d783ade02468b
Author: Pierre Tardy <pierre.tardy@intel.com>
Date: Fri Jan 14 11:45:33 2011 +0100
intel_scu: change init time to early in the boot
This will resolve lot of problem with gpio not beeing available, and
other scu capability needed by drivers early in the boot process.
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Change-Id: I4db59373fbe9cb2eaa756d02d07b56c9837b1957
Signed-off-by: Fei Yang <fei.yang@intel.com>
Fei Yang [Fri, 23 Sep 2011 16:20:41 +0000 (09:20 -0700)]
MMC: Merge two patches from UMG 2.6.35
commit
471bd99eac8935361ada496d59e1b4cc1ad83e90
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Date: Thu Mar 3 13:49:00 2011 +0800
mmc: emmc mutex support for medfield
One of the Medfield eMMC controller (PCI device id 0x0823, SDIO3)
is a shared resource used by the SCU and the IA processors.
SCU primarily uses the eMMC host controller to access the eMMC device's
Boot Partition, while the IA CPU uses the eMMC host controller to
access the eMMC device's User Partition.
After the SCU hands off the system to the IA processor, the IA processor
assumes ownership to the eMMC host controller. Due to absence of any
arbitration at the eMMC host controller, this could result in concurrent
eMMC host accesses resulting in bus contention and garbage data ending up
in either of the partitions.
To circumvent this from happening, eMMC host controller locking mechanism
is employed, where at any one given time, only one agent, SCU or IA,
may be allowed to access the host. This is achieved by implementing
Dekker's Algorithm (http://en.wikipedia.org/wiki/Dekker's_algorithm)
between the two processors.
Before handing off the system to the IA processor, SCU must set up three
housekeeping mutex variables allocated in the shared SRAM as follows:
eMMC_Owner = IA (SCU and IA processors - RW, 32bit)
IA_Req = FALSE (IA -RW, SCU - RO, 32bit)
SCU_Req = FALSE (IA - RO, SCU - R/W, 32bit)
There is no hardware based access control to these variables and so code
executing on SCU and IA processors must follow access rules of
Dekker's algorithm. Detail info about this algorithm can be found in
comments and code of this patch.
Change-Id: Iaa27dcf5eaeaed30348073b041d3268890839a8b
Signed-off-by: Yunpeng Gao <yunpeng.gao@intel.com>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
commit
9a8b4cc0bc0908006c566fd21c927fdc191fb185
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Date: Thu Mar 3 13:50:02 2011 +0800
mmc: use emmc mutex api to protect emmc
Apply the eMMC mutext APIs to protect the critical sections of
eMMC0 host controller opeartions on Medfield platform.
Change-Id: I2ff82ab66c05f56b16c50431e27f78c8ee5cfa0b
Signed-off-by: Yunpeng Gao <yunpeng.gao@intel.com>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Change-Id: I670b72c18c2bdac4e6165b82f5f60084b1809aa9
Signed-off-by: Fei Yang <fei.yang@yahoo.com>
Andy Shevchenko [Fri, 22 Jul 2011 13:13:36 +0000 (16:13 +0300)]
mmc: mmc_test: avoid stalled file in debugfs
During card removal and inserting cycle the test file in the debugfs could be
stalled until the host driver removes it. Let's keep the file in the linked
list and destroy it when card is removed.
Change-Id: I9a8340a2b38ffa9afa3086b0a36c5e75434a16e2
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Per Forlin <per.forlin@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:25 +0000 (18:55 +0200)]
mmc: mmc_test: add debugfs file to list all tests
Add a debugfs file "testlist" to print all available tests.
Change-Id: I899def93bf537b75748aecc40088c7f8b14b6e7b
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:27 +0000 (18:55 +0200)]
mmc: mmc_test: test to measure how sg_len affect performance
Add a test that measures how the mmc bandwidth depends on the numbers of
sg elements in the sg list. The transfer size if fixed and sg length goes
from a few up to 512. The purpose is to measure overhead caused by
multiple sg elements.
Change-Id: I8cbe352653938bc36a9d40863fe8a7b98ca06b93
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:26 +0000 (18:55 +0200)]
mmc: mmc_test: add test for non-blocking transfers
Add four tests for read and write performance per
different transfer size, 4k to 4M.
* Read using blocking mmc request
* Read using non-blocking mmc request
* Write using blocking mmc request
* Write using non-blocking mmc request
The host driver must support pre_req() and post_req()
in order to run the non-blocking test cases.
Change-Id: Ief4ec9607d09659acce7ce30e0d13378576f2c11
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Jaehoon Chung [Wed, 10 Aug 2011 09:46:28 +0000 (18:46 +0900)]
mmc: core: use defined R1_STATE_PRG macro for card status
Change-Id: I8d6b242cb324c6fa83b289cbdd4dd4d66fdd0836
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Kyungmin Park [Tue, 26 Jul 2011 08:12:37 +0000 (17:12 +0900)]
mmc: core: Detect eMMC v4.5 ext_csd entries
The eMMC v4.5 Spec is released now:
EXT_CSD_REV Extended CSD Revision
255-7 Reserved
6 Revision 1.6 (for MMC v4.5)
5 Revision 1.5 (for MMV v4.41)
...
Change-Id: I24f84b7bea41ffc480c3fbce1960fc1a97eedd75
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Amerigo Wang [Tue, 26 Jul 2011 00:13:11 +0000 (17:13 -0700)]
notifiers: pm: move pm notifiers into suspend.h
It is not necessary to share the same notifier.h.
Change-Id: Icb098842df77e217d15cb4609e181ad9945983ff
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: David Miller <davem@davemloft.net>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Drake [Sun, 17 Jul 2011 15:38:41 +0000 (16:38 +0100)]
mmc: print debug messages for runtime PM actions
At http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg08371.html
(thread: "mmc: sdio: reset card during power_restore") we found and
fixed a bug where mmc's runtime power management functions were not being
called. We have now also made improvements to the SDIO powerup routine
which could possibly mask this kind of issue in future.
Add debug messages to the runtime PM hooks so that it is easy to verify
if and when runtime PM is happening.
Change-Id: I563bcd5b7f9902b1ec54ad6d1d44af58c416b039
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Ohad Ben-Cohen [Sun, 17 Jul 2011 15:38:21 +0000 (16:38 +0100)]
mmc: fix runtime PM with -ENOSYS suspend case
In the case where a driver returns -ENOSYS from its suspend handler
to indicate that the device should be powered down over suspend, the
remove routine of the driver was not being called, leading to lots of
confusion during resume.
The problem is that runtime PM is disabled during this process,
and when we reach mmc_sdio_remove, calling the runtime PM functions here
(validly) return errors, and this was causing us to skip the remove
function.
Fix this by ignoring the error value of pm_runtime_get_sync(), which
can return valid errors. This also matches the behaviour of
pci_device_remove().
Change-Id: I4309732b25ae3c4d4c45a141d520abac7c899241
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Jaehoon Chung [Wed, 13 Jul 2011 08:02:16 +0000 (17:02 +0900)]
mmc: block: fixed NULL pointer dereference
We already check for ongoing async transfers when handling discard
requests, but not in mmc_blk_issue_flush(). This patch fixes that
omission.
Tested with an SDHCI controller and eMMC4.41.
Change-Id: I514b79abcbe91a23311a7b8a4ea08dfdf02f03c8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Per Forlin <per.forlin@linaro.org>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Philip Rakity [Wed, 6 Jul 2011 15:51:32 +0000 (08:51 -0700)]
mmc: core: Set non-default Drive Strength via platform hook
Non default Drive Strength cannot be set automatically. It is a function
of the board design and only if there is a specific platform handler can
it be set. The platform handler needs to take into account the board
design. Pass to the platform code the necessary information.
For example: The card and host controller may indicate they support HIGH
and LOW drive strength. There is no way to know what should be chosen
without specific board knowledge. Setting HIGH may lead to reflections
and setting LOW may not suffice. There is no mechanism (like ethernet
duplex or speed pulses) to determine what should be done automatically.
If no platform handler is defined -- use the default value.
Change-Id: I76b34da2a62d6c3fe307ac92f241ead2f98d4950
Signed-off-by: Philip Rakity <prakity@marvell.com>
Reviewed-by: Arindam Nath <arindam.nath@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:33 +0000 (18:55 +0200)]
mmc: block: add handling for two parallel block requests in issue_rw_rq
Change mmc_blk_issue_rw_rq() to become asynchronous.
The execution flow looks like this:
* The mmc-queue calls issue_rw_rq(), which sends the request
to the host and returns back to the mmc-queue.
* The mmc-queue calls issue_rw_rq() again with a new request.
* This new request is prepared in issue_rw_rq(), then it waits for
the active request to complete before pushing it to the host.
* When the mmc-queue is empty it will call issue_rw_rq() with a NULL
req to finish off the active request without starting a new request.
Change-Id: I77a4906a11dddb6570e87b92d048ef209f37fb01
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:31 +0000 (18:55 +0200)]
mmc: queue: add a second mmc queue request member
Add an additional mmc queue request instance to make way for two active
block requests. One request may be active while the other request is
being prepared.
Change-Id: I306d5f0ab4eeac7fbad0e600e131e4862cd24a19
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:30 +0000 (18:55 +0200)]
mmc: block: move error path in issue_rw_rq to a separate function.
Break out code without functional changes. This simplifies the code and
makes way for handling two parallel requests.
Change-Id: Ie27ee124fbd933603ebcf59de96ab1798e1ef105
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar<sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:29 +0000 (18:55 +0200)]
mmc: block: add a block request prepare function
Break out code from mmc_blk_issue_rw_rq to create a block request prepare
function. This doesn't change any functionallity. This helps when handling
more than one active block request.
Change-Id: I8df6f5422cb03a839154680e160f1be86ca10346
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Per Forlin [Fri, 1 Jul 2011 16:55:22 +0000 (18:55 +0200)]
mmc: core: add non-blocking mmc request function
Previously there has only been one function mmc_wait_for_req()
to start and wait for a request. This patch adds:
* mmc_start_req() - starts a request wihtout waiting
If there is on ongoing request wait for completion
of that request and start the new one and return.
Does not wait for the new command to complete.
This patch also adds new function members in struct mmc_host_ops
only called from core.c:
* pre_req - asks the host driver to prepare for the next job
* post_req - asks the host driver to clean up after a completed job
The intention is to use pre_req() and post_req() to do cache maintenance
while a request is active. pre_req() can be called while a request is
active to minimize latency to start next job. post_req() can be used after
the next job is started to clean up the request. This will minimize the
host driver request end latency. post_req() is typically used before
ending the block request and handing over the buffer to the block layer.
Add a host-private member in mmc_data to be used by pre_req to mark the
data. The host driver will then check this mark to see if the data is
prepared or not.
Change-Id: Ifc89392648d50d4616f9ef89372517fb54af2fcb
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>