[PATCH v9 10/10] mmc: sdhci: clean code for SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK selected

2012-12-06 Thread Kevin Liu
If SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK is selected, getting timeout through register or callback function is useless. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/sd

[PATCH v9 09/10] mmc: sdhci: correct voltage support caps setting

2012-12-06 Thread Kevin Liu
Correct the judgement logic. Disable the voltage support caps which has been disabled is unreasonable. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 20a

[PATCH v9 08/10] mmc: sdhci: add function to get retunig timer count

2012-12-06 Thread Kevin Liu
According to SD host spec (Capabilities Register, offset 0x40<43:40>), if timer count for retuning return 0xF, it means get information from other source. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c |8 drivers/mmc/host/sdhci.h |1 + 2 files changed, 9 insertions(+),

[PATCH v9 07/10] mmc: sdhci: remove set_uhs_signaling function

2012-12-06 Thread Kevin Liu
Because default way can cover all cases so no need to implement this. Acked-by: Zhangfei Gao Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci-pxav3.c | 39 - drivers/mmc/host/sdhci.c | 47 ++- drivers/mmc/host/sdhc

[PATCH v9 05/10] mmc: sdhci: introduce signal_voltage_switch callback function

2012-12-06 Thread Kevin Liu
Some soc/platform need specific handling for signal voltage switch. For example, mmp2/mmp3 need to set the AIB IO domain control register accordingly. Signed-off-by: Bin Wang Signed-off-by: Philip Rakity Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 17 + drivers/mm

[PATCH v9 04/10] mmc: sdhci: enhance preset value function

2012-12-06 Thread Kevin Liu
Preset value support was added by 4d55c5a1. But preset value is enabled after setting clock finished, which means the clock is still set by driver firstly and then switch to preset value at this point. So the driver setting beforehand is useless and unnecessary. What's more, driver is still using

[PATCH v9 06/10] mmc: sdhci: fix the bug that DDR50 can't work for emmc in default code

2012-12-06 Thread Kevin Liu
According to SD host controller spec (Host Control 2 Register, offset 0x3E<3:0>), 1.8v signaling must be enabled for UHS-I modes. Otherwise all UHS-I modes will NOT take effect. For both sd and sdio card with UHS-I enabled, 1.8v signaling is enabled in mmc_set_signal_voltage. But emmc with DDR50 w

[PATCH v9 02/10] mmc: sdhci: refine code for clock disable/enable in set ios

2012-12-06 Thread Kevin Liu
With preset value enabled, there are two continuous times of clock disable/enable. They can be combined into one to save time and make code cleaner. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 29 + 1 files changed, 9 insertions(+), 20 deletions(-) diff

[PATCH v9 03/10] mmc: sdhci: keep the saved clock var up to date

2012-12-06 Thread Kevin Liu
The clock rate set to the sdh controller may not exactly as requested by the mmc core, this patch make the clock rate saved in the mmc_ios and sdhci_host updated with the actual setting as in the controller. Thus "/sys/kernel/debug/mmcx/ios" and card detect prints can show the correct clock rate. O

[PATCH v9 00/10] mmc: sdhci: fixes and enhancements

2012-12-06 Thread Kevin Liu
This patchset aim to fix bugs and do some code enhancement for sdhci.c Most patches are quite small. I will highly appreciate if you can pay a few minutes to review them. Any comments are welcome. [PATCH v9 01/10] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer [PATCH v9 02

[PATCH v9 01/10] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer

2012-12-06 Thread Kevin Liu
With current code, commands without data transfer like cmd5/cmd7 still use previous transfer mode setting, which may lead to error since some bits may have been set unexpectedly. For example, cmd5 following cmd18/cmd25 will have timeout error since audo cmd23 has been enabled. This bug will lead t

Re: [PATCH v1 1/3] mmc: sdio: fix resume failure

2012-12-06 Thread Ulf Hansson
On 6 December 2012 16:25, Subhash Jadavani wrote: > > On 12/6/2012 4:03 PM, Ulf Hansson wrote: >> >> On 4 December 2012 12:36, Subhash Jadavani >> wrote: >>> >>> If SDIO keep power flag (MMC_PM_KEEP_POWER) is not set, card would >>> be reinitialized during resume but as we are not resetting >>> (

[GIT PULL] MMC fixes for 3.7

2012-12-06 Thread Chris Ball
Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git tags/mmc-fixes-for-3.7 to receive two small regression fixes for 3.7. There are no merge conflicts. Thanks. The following changes since commit 0aa55c2367f082876f92660312214cd20c6a024b: mmc: sdhci-s3c:

RE: [PATCH v1 2/3] mmc: sdio: Fix SDIO 3.0 UHS-I initialization sequence

2012-12-06 Thread Bing Zhao
Hi Subhash, > >> sdhci_add_host() reads host controller's capabilities and initialize > >> host->caps of function > >> mmc_host_uhs(). So mmc_host_uhs() only return this cached values. > > So, it does represent host controller's capabilities, not the capabilities > > of the card. > > What happen

Re: [PATCH v9 00/10] mmc: sdhci: fixes and enhancements

2012-12-06 Thread Kevin Liu
2012/12/6 Chris Ball : > Hi, > > On Thu, Dec 06 2012, Kevin Liu wrote: >>> From: Kevin Liu [keyuan@gmail.com] >>> Sent: Monday, December 03, 2012 9:09 PM >>> To: linux-mmc@vger.kernel.org; c...@laptop.org; arindam.n...@amd.com; >>> peppe.cavall...@st.com; ulf.hans...@linaro.org; >>> andriy.sh

Re: [PATCH v1 1/3] mmc: sdio: fix resume failure

2012-12-06 Thread Subhash Jadavani
On 12/6/2012 4:03 PM, Ulf Hansson wrote: On 4 December 2012 12:36, Subhash Jadavani wrote: If SDIO keep power flag (MMC_PM_KEEP_POWER) is not set, card would be reinitialized during resume but as we are not resetting (CMD52 reset) the SDIO card during this reinitialization, card may fail to re

Re: [PATCH v9 00/10] mmc: sdhci: fixes and enhancements

2012-12-06 Thread Chris Ball
Hi, On Thu, Dec 06 2012, Kevin Liu wrote: >> From: Kevin Liu [keyuan@gmail.com] >> Sent: Monday, December 03, 2012 9:09 PM >> To: linux-mmc@vger.kernel.org; c...@laptop.org; arindam.n...@amd.com; >> peppe.cavall...@st.com; ulf.hans...@linaro.org; >> andriy.shevche...@linux.intel.com; prak...

Re: [PATCH v9 00/10] mmc: sdhci: fixes and enhancements

2012-12-06 Thread Kevin Liu
> From: Kevin Liu [keyuan@gmail.com] > Sent: Monday, December 03, 2012 9:09 PM > To: linux-mmc@vger.kernel.org; c...@laptop.org; arindam.n...@amd.com; > peppe.cavall...@st.com; ulf.hans...@linaro.org; > andriy.shevche...@linux.intel.com; prak...@nvidia.com > Cc: zhangfei@gmail.com; haojia

Re: [PATCH v4] mmc: fix async request mechanism for sequential read scenarios

2012-12-06 Thread Konstantin Dorfman
On 12/06/2012 07:24 AM, Seungwon Jeon wrote: > Hi, > > Doesn't it consider SD path? > It have a problem with uninitialized 'context_info'. > 'context_info' is moved into mmc_host struct in v4. > Please, could you explain the reason in brief? > The problem I'm trying to resolve with the v4 change

Re: [PATCH 1/1] mmc: sdhci-pci: Enable SDHCI_CAN_DO_HISPD for ricoh SDHCI controller

2012-12-06 Thread Chris Ball
Hi, On Thu, Dec 06 2012, Madhvapathi Sriram wrote: > Hi, > > Can I consider this accepted since there are no comments? Thanks, pushed to mmc-next for 3.8. - Chris. -- Chris Ball One Laptop Per Child -- To unsubscribe from this list: send the line "unsubscribe linux-mmc

Re: [PATCH v1 3/3] mmc: sdio: print correct UHS mode during card detection

2012-12-06 Thread Ulf Hansson
On 4 December 2012 12:36, Subhash Jadavani wrote: > When SDIO3.0 card is detected, incorrect bus speed mode > is printed as part of card detection print in kernel logs. > > This change fixes it so that user won't be confused by > looking at incorrect card detection message in logs. > > Signed-off-

Re: [PATCH v1 1/3] mmc: sdio: fix resume failure

2012-12-06 Thread Ulf Hansson
On 4 December 2012 12:36, Subhash Jadavani wrote: > If SDIO keep power flag (MMC_PM_KEEP_POWER) is not set, card would > be reinitialized during resume but as we are not resetting > (CMD52 reset) the SDIO card during this reinitialization, card may > fail to respond back to subsequent commands (CM

Re: [PATCH v3] mmc: core: Add support for idle time BKOPS

2012-12-06 Thread Ulf Hansson
Hi Maya, On 4 December 2012 22:17, wrote: > Hi Ulf, > > Let me try to better explain: > The idea behind the periodic BKOPS is to check the card's need for BKOPS > periodically in order to prevent an urgent BKOPS need by the card. > In order to actually manage to prevent the urgent BKOPS need, th