Re: [PATCH 2/2] mmc: only support voltage (vdd) that regulator agree's with

2012-07-03 Thread Aaron Lu
Hi Chris, On Fri, Jun 29, 2012 at 07:19:19PM -0400, Chris Ball wrote: Hi, On Fri, Jun 08 2012, philipspatc...@gmail.com wrote: From: Philip Rakity prak...@marvell.com If we are using a regulator the SD Host Controller and the regulator should agree about the voltages supported. Use

[PATCH 0/2] SD current limit setting fix

2012-07-03 Thread Aaron Lu
The following 2 patches fix setting of SD current limit Aaron Lu (2): mmc: core: Simplify and fix for SD switch processing mmc: sd: Fix sd current limit setting drivers/mmc/core/sd.c| 144 +++ drivers/mmc/host/sdhci.c | 28 +++--

[PATCH 1/2] mmc: core: Simplify and fix for SD switch processing

2012-07-03 Thread Aaron Lu
In mmc_read_switch, just do a one time mode 0 switch command to get the support bits information, no need to do multiple times as the support bits do not change with different arguments. And no need to check current limit support bits, as these bits is fixed according to the signal voltage. If

[PATCH 2/2] mmc: sd: Fix sd current limit setting

2012-07-03 Thread Aaron Lu
Host has different current capabilities at different voltages, we need to record these settings seperately. Before set current limit for the sd card, find out the current voltage first and then find out the current capabilities of the host to set the limit. Signed-off-by: Aaron Lu

Re: [PATCH] mmc: mxs-mmc: enable regulator for mmc slot

2012-07-03 Thread Shawn Guo
Hi Chris, Ping. Regards, Shawn On Tue, Jun 26, 2012 at 04:38:57PM +0800, Shawn Guo wrote: If bootloader or platform initialization code does not enable the power supply to mmc slot, we need to do it in mmc driver. Signed-off-by: Shawn Guo shawn@linaro.org ---

[PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Aaron Lu
V2: Fix for SDIO case: both SD and SDIO cards use cmd19 while eMMC use cmd21. V1: For SD hosts using retuning mode 1, when retuning timer expired, it will need to do retuning in sdhci_request before processing the actual request. But the retuning command is fixed: cmd19 for SD card and cmd21 for

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Girish K S
On 3 July 2012 14:57, Aaron Lu aaron...@amd.com wrote: V2: Fix for SDIO case: both SD and SDIO cards use cmd19 while eMMC use cmd21. V1: For SD hosts using retuning mode 1, when retuning timer expired, it will need to do retuning in sdhci_request before processing the actual request. But

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Aaron Lu
Hi, On Tue, Jul 03, 2012 at 03:28:28PM +0530, Girish K S wrote: On 3 July 2012 14:57, Aaron Lu aaron...@amd.com wrote: V2: Fix for SDIO case: both SD and SDIO cards use cmd19 while eMMC use cmd21. V1: For SD hosts using retuning mode 1, when retuning timer expired, it will need to do

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Girish K S
On 3 July 2012 17:01, Aaron Lu aaron...@amd.com wrote: Hi, On Tue, Jul 03, 2012 at 03:28:28PM +0530, Girish K S wrote: On 3 July 2012 14:57, Aaron Lu aaron...@amd.com wrote: V2: Fix for SDIO case: both SD and SDIO cards use cmd19 while eMMC use cmd21. V1: For SD hosts using retuning

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Girish K S
On 3 July 2012 17:27, Girish K S girish.shivananja...@linaro.org wrote: On 3 July 2012 17:01, Aaron Lu aaron...@amd.com wrote: Hi, On Tue, Jul 03, 2012 at 03:28:28PM +0530, Girish K S wrote: On 3 July 2012 14:57, Aaron Lu aaron...@amd.com wrote: V2: Fix for SDIO case: both SD and SDIO

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Girish K S
On 3 July 2012 17:27, Girish K S girish.shivananja...@linaro.org wrote: On 3 July 2012 17:01, Aaron Lu aaron...@amd.com wrote: Hi, On Tue, Jul 03, 2012 at 03:28:28PM +0530, Girish K S wrote: On 3 July 2012 14:57, Aaron Lu aaron...@amd.com wrote: V2: Fix for SDIO case: both SD and SDIO

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Aaron Lu
Hi, On Tue, Jul 03, 2012 at 05:32:36PM +0530, Girish K S wrote: @@ -1292,8 +1294,12 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)                  */                 if ((host-flags SDHCI_NEEDS_RETUNING)                     !(present_state

RE: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Philip Rakity
Reviewed-by philip Rakity prak...@marvell.com From: Aaron Lu [aaron...@amd.com] Sent: Tuesday, July 03, 2012 2:27 AM To: Girish K S; Subhash Jadavani; Philip Rakity; Chris Ball Cc: linux-mmc@vger.kernel.org; Aaron Lu; Aaron Lu; stable;

Re: [PATCH 2/2] mmc: sd: Fix sd current limit setting

2012-07-03 Thread Philip Rakity
Hi Arron, One minor comment -- okay without the change but clearer IMHO with the change. Reviewed-by: Philip Rakity prak...@marvell.com Philip On Jul 2, 2012, at 11:16 PM, Aaron Lu wrote: Host has different current capabilities at different voltages, we need to record these settings

Re: [PATCH] mmc: core: Revert skip card initialization ifpowerclass selection fails

2012-07-03 Thread Marc Dietrich
On Tuesday 03 July 2012 09:25:11 Girish K S wrote: On 2 July 2012 16:50, Marc Dietrich marvi...@gmx.de wrote: Am Montag, 2. Juli 2012, 14:28:37 schrieb Girish K S: On 2 July 2012 14:23, Girish K S girish.shivananja...@linaro.org wrote: On 2 July 2012 14:13, Saugata Das

[PATCH] sdhci-pci: CaFe has broken card detection

2012-07-03 Thread Daniel Drake
At http://dev.laptop.org/ticket/11980 we have determined that the Marvell CaFe SDHCI controller reports bad card presence during resume. It reports that no card is present even when it is. Around 400ms after resuming, a card inserted interrupt is generated, at which point it starts reporting

Re: [PATCH] mmc: mxs-mmc: enable regulator for mmc slot

2012-07-03 Thread Chris Ball
Hi, On Tue, Jun 26 2012, Shawn Guo wrote: If bootloader or platform initialization code does not enable the power supply to mmc slot, we need to do it in mmc driver. Signed-off-by: Shawn Guo shawn@linaro.org --- drivers/mmc/host/mxs-mmc.c | 11 +++ 1 files changed, 11

Re: [PATCH] mmc: always save error codes in mmc_regulator_get_supply()

2012-07-03 Thread Chris Ball
Hi, On Wed, Jun 27 2012, Guennadi Liakhovetski wrote: If mmc_regulator_get_supply() fails to obtain any of the regulators, store the error codes in struct mmc_host to unify error reporting to the host driver. Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de --- Chris, if you

Re: [PATCH] sdhci: V3: Allow CAPS[1] to be set via QUIRK

2012-07-03 Thread Chris Ball
Hi, On Thu, Jun 28 2012, philipspatc...@gmail.com wrote: From: Philip Rakity prak...@marvell.com currently only the capability_0 register can be set if SDHCI_QUIRK_MISSING_CAPS is defined. This is a problem when the capability_1 register also needs changing. Use the

Re: [PATCH] mmc: Convert s3cmci driver to gpiolib API

2012-07-03 Thread Chris Ball
Hi, On Sat, Jun 30 2012, Sylwester Nawrocki wrote: The s3c2410_gpio* calls are obsolete and have been scheduled for removal since several kernel releases. Remove them and use common gpiolib API. This patch is a prerequisite for removal of the S3C24XX SoC specific

Re: [PATCH] mmc: Report failure reasons for all cases in sdhci_add_host()

2012-07-03 Thread Chris Ball
Hi, On Mon, Jul 02 2012, Mark Brown wrote: For most error conditions sdhci_add_host() will print a diagnostic message indicating why it failed but there are a few cases where this does not happen. Add error messages in these cases to aid diagnosis. Signed-off-by: Mark Brown

Re: [PATCH] sdhci-pci: CaFe has broken card detection

2012-07-03 Thread Chris Ball
Hi Dan, On Tue, Jul 03 2012, Daniel Drake wrote: At http://dev.laptop.org/ticket/11980 we have determined that the Marvell CaFe SDHCI controller reports bad card presence during resume. It reports that no card is present even when it is. Around 400ms after resuming, a card inserted interrupt

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Chris Ball
Hi, On Tue, Jul 03 2012, Aaron Lu wrote: V2: Fix for SDIO case: both SD and SDIO cards use cmd19 while eMMC use cmd21. V1: For SD hosts using retuning mode 1, when retuning timer expired, it will need to do retuning in sdhci_request before processing the actual request. But the retuning

Re: [PATCH v2 1/2] mmc: sdhci: restore host settings when card is removed

2012-07-03 Thread Chris Ball
Hi, On Fri, Jun 29 2012, Aaron Lu wrote: Some of the host settings are affected by different cards inserted, e.g. when an UHS-I card is inserted, the SDHCI_NEEDS_RETUING flag might be set when the tuning timer expired and host's max_blk_count will be reduced to make sure the data transfer for

Re: [PATCH v2 2/2] mmc: sdhci: A new flag SDHCI_NEEDS_RETUNING_TIMER

2012-07-03 Thread Chris Ball
Hi, On Fri, Jun 29 2012, Aaron Lu wrote: Add a new flag of SDHCI_NEEDS_RETUNING_TIMER to represent if the host currently needs retuning timer when driving the card inserted. Minor changes: Could we call it SDHCI_USING_RETUNING_TIMER, then? I don't think NEEDS makes the use clear enough. @@

Re: [PATCH 1/2] mmc: core: Simplify and fix for SD switch processing

2012-07-03 Thread Chris Ball
Hi, On Tue, Jul 03 2012, Aaron Lu wrote: In mmc_read_switch, just do a one time mode 0 switch command to get the support bits information, no need to do multiple times as the support bits do not change with different arguments. And no need to check current limit support bits, as these bits

Re: [PATCH 2/2] mmc: sd: Fix sd current limit setting

2012-07-03 Thread Chris Ball
Hi, On Tue, Jul 03 2012, Aaron Lu wrote: Host has different current capabilities at different voltages, we need to record these settings seperately. Before set current limit for the sd card, find out the current voltage first and then find out the current capabilities of the host to set the

Re: [PATCH v2] mmc: sdhci: fix incorrect command used in tuning

2012-07-03 Thread Aaron Lu
Hi Chris, On Tue, Jul 03, 2012 at 08:37:33PM -0400, Chris Ball wrote: Hi, On Tue, Jul 03 2012, Aaron Lu wrote: V2: Fix for SDIO case: both SD and SDIO cards use cmd19 while eMMC use cmd21. V1: For SD hosts using retuning mode 1, when retuning timer expired, it will need to do

[PATCH v3 2/2] mmc: sdhci: A new flag SDHCI_USING_RETUNING_TIMER

2012-07-03 Thread Aaron Lu
Add a new flag of SDHCI_USING_RETUNING_TIMER to represent if the host is using a retuning timer for the card inserted. This flag is set when the host does tuning the first time for the card and the host's retuning mode is 1. This flag is used afterwards whenever needs to decide if the host is

[PATCH v2 2/2] mmc: sd: Fix sd current limit setting

2012-07-03 Thread Aaron Lu
Host has different current capabilities at different voltages, we need to record these settings seperately. The defined voltages are 1.8/3.0/3.3. For other voltages, we do not touch current limit setting. Before set current limit for the sd card, find out the host's operating voltage first and