Re: [PATCH] Revert "sdhci-of-esdhc: Support 8BIT bus width."

Kevin Hao
2015-05-15T07:36:26Z

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

On Fri, May 15, 2015 at 07:02:44AM +0000, Joakim Tjernlund wrote:
> Reverting this seem a bit to much. Looking in the log it seems commit
> 2317f56c055fcad524bf6a873df48a754e7ebc4d
> introduced the error by not checking for host->ops->set_bus_width before
> calling it.
>
> How does this work for you?

No. My sd card still don't work with this change.

>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index c80287a..23603b2 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1528,7 +1528,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
> if (host->ops->platform_send_init_74_clocks)
> host->ops->platform_send_init_74_clocks(host, ios->power_mode);
>
> - host->ops->set_bus_width(host, ios->bus_width);
> + if (host->ops->set_bus_width)
> + host->ops->set_bus_width(host, ios->bus_width);
> + else
> + sdhci_set_bus_width(host, ios->bus_width);

The default sdhci_set_bus_width() doesn't apply to the esdhc controller on my
board (p2020rdb). This controller is compatible with the sd host specification
2.0 and the implementation of sdhci_set_bus_width() can't set the bus width
correctly for it.

Thanks,
Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]