2010-12-15 13:17:31

by Takashi Iwai

[permalink] [raw]
Subject: [PATCH] mmc: Enable bus-width tests on SDHCI host

Let's enable the new bus-width tests on SDHCI hosts unless 1-bit data
is set forcibly.

Signed-off-by: Takashi Iwai <[email protected]>
---

This is a patch to be applied after
"mmc: Test bus-width for old MMC devices (v2)"


drivers/mmc/host/sdhci.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0502738..51f5209 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1888,8 +1888,10 @@ int sdhci_add_host(struct sdhci_host *host)
* their platform code before calling sdhci_add_host(), and we
* won't assume 8-bit width for hosts without that CAP.
*/
- if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
+ if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA)) {
mmc->caps |= MMC_CAP_4_BIT_DATA;
+ mmc->caps |= MMC_CAP_BUS_WIDTH_TEST;
+ }

if (caps & SDHCI_CAN_DO_HISPD)
mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
--
1.7.3.1


2010-12-15 19:40:56

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH] mmc: Enable bus-width tests on SDHCI host

At Wed, 15 Dec 2010 14:17:27 +0100,
Takashi Iwai wrote:
>
> Let's enable the new bus-width tests on SDHCI hosts unless 1-bit data
> is set forcibly.
>
> Signed-off-by: Takashi Iwai <[email protected]>

Please drop this patch.

After a short discussion with Philip, we concluded that it's safer to
enable in individual platform side.

I'll send a patch for enabling the feature for JMicron chips later again.


thanks,

Takashi

> ---
>
> This is a patch to be applied after
> "mmc: Test bus-width for old MMC devices (v2)"
>
>
> drivers/mmc/host/sdhci.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 0502738..51f5209 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1888,8 +1888,10 @@ int sdhci_add_host(struct sdhci_host *host)
> * their platform code before calling sdhci_add_host(), and we
> * won't assume 8-bit width for hosts without that CAP.
> */
> - if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
> + if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA)) {
> mmc->caps |= MMC_CAP_4_BIT_DATA;
> + mmc->caps |= MMC_CAP_BUS_WIDTH_TEST;
> + }
>
> if (caps & SDHCI_CAN_DO_HISPD)
> mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
> --
> 1.7.3.1
>

2010-12-16 16:54:19

by Takashi Iwai

[permalink] [raw]
Subject: [PATCH] mmc/sdhci: Enable bus-width test for JMicron controllers


Signed-off-by: Takashi Iwai <[email protected]>
---

This is a patch to be applied after
"mmc: Test bus-width for old MMC devices (v2)"

and a replacement for the previous "mmc: Enable bus-width tests on
SDHCI host" patch. Instead of enabling all for sdhci, this one turns
on the feature only for JMicron, just to be safer.


drivers/mmc/host/sdhci-pci.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index d2638ff..0dc905b 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -381,6 +381,8 @@ static int jmicron_probe_slot(struct sdhci_pci_slot *slot)
slot->chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD)
jmicron_enable_mmc(slot->host, 1);

+ slot->host->mmc->caps |= MMC_CAP_BUS_WIDTH_TEST;
+
return 0;
}

--
1.7.3.1

2010-12-17 03:58:12

by Chris Ball

[permalink] [raw]
Subject: Re: [PATCH] mmc/sdhci: Enable bus-width test for JMicron controllers

Hi Takashi,

On Thu, Dec 16, 2010 at 05:54:14PM +0100, Takashi Iwai wrote:
>
> Signed-off-by: Takashi Iwai <[email protected]>
> ---
>
> This is a patch to be applied after
> "mmc: Test bus-width for old MMC devices (v2)"
>
> and a replacement for the previous "mmc: Enable bus-width tests on
> SDHCI host" patch. Instead of enabling all for sdhci, this one turns
> on the feature only for JMicron, just to be safer.
>
>
> drivers/mmc/host/sdhci-pci.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
> index d2638ff..0dc905b 100644
> --- a/drivers/mmc/host/sdhci-pci.c
> +++ b/drivers/mmc/host/sdhci-pci.c
> @@ -381,6 +381,8 @@ static int jmicron_probe_slot(struct sdhci_pci_slot *slot)
> slot->chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD)
> jmicron_enable_mmc(slot->host, 1);
>
> + slot->host->mmc->caps |= MMC_CAP_BUS_WIDTH_TEST;
> +
> return 0;
> }
>

Thanks, pushed to mmc-next.

(Do others on the list agree that bus-width testing should be
whitelisted per-host like this?)

--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child