[PATCH 3/6] mmc: sdhci: add platform set_timeout hook

Shawn Guo shawn.guo at linaro.org
Tue Dec 10 22:48:26 EST 2013


On Wed, Dec 11, 2013 at 11:35:17AM +0800, Dong Aisheng wrote:
> This actually is the register value, not the max timeout counter value.
> Then you may want define the API as:
> unsigned int    (*get_max_timeout_val)(struct sdhci_host *host);

Yes, something like that.

> But i don't think it's necessary to do the max timeout setting in two steps.
> First, deinfe a API to get the max timeout counter val,
> Second, write this val into register.
> Why not simply implement .set_timeout and handle the details in
> platform specific
> host driver respectively?

Well, that's how sdhci host driver is structured.  Doing so leaves the
least details to platform driver, and calling sdhci_writeb() to access
SDHCI_TIMEOUT_CONTROL in sdhci-esdhc-imx seems a layer violation to me.

> 
> Furthermore, this API does not  help for the patch#1 issue.

Oh, they two different issues, and should be addressed by different
hooks.

Shawn




More information about the linux-arm-kernel mailing list