A serial patchs that support FSL's eSDHC
Hi All:
Can you help me to review the following serial patchs, that enable the sdhci driver to support FSL's eSDHC on i.MX family.
Thanks in advanced.
PATCH 1/9 sdhci-1: add host's own set_power func to support the controller that used it's own power mechanism
FSL's eSDHC controllers don't have the STANDARD POWER register in the IC design, add the set_power api to support the FSL's eSDHC.
--- drivers/mmc/host/sdhci.c | 5 +++++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-)
drivers/mmc/host/sdhci.c +5 -0
@@ -1036,6 +1036,11 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power) {u8 pwr; +if (host->ops->set_power) { + host->ops->set_power (host, power); +return ; + } +if (power == (unsigned short )-1 ) pwr =0 ;else {
drivers/mmc/host/sdhci.h +1 -0
@@ -316,6 +316,7 @@ struct sdhci_ops {#endif void (*set_clock)(struct sdhci_host *host,unsigned int clock); +void (*set_power)(struct sdhci_host *host,unsigned int power);int (*enable_dma)(struct sdhci_host *host);unsigned int (*get_max_clock)(struct sdhci_host *host);
Signature · 1 line
1.7.0
Quoted 2 lines · Richard Zhu
Can you help me to review the following serial patchs, that enable the sdhci driver to support FSL's eSDHC on i.MX family.
I see two major problems: First, you often modify sdhci.c to work around the hardware-quirks. See sdhci-of-esdhc.c how it can be handled in a seperate source-file and keep sdhci.c clean. (While at it, what is common between the of-driver and the platform-driver should be shared). Second, your platform-driver is a complete one, but we have a platform core meanwhile (sdhci-pltfm.c). Please use that.
Kind regards,
Wolfram
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100901/3451cf26/attachment.sig>
Hi Wolfram:
Thanks for your comments.
I would change the patches and resend them later.
Best Regards,
Richard Zhu
Freescale Semiconductor
Tel: +86-021-28937189
Email:Hong-Xing.Zhu at freescale.com
-----Original Message-----
From: Wolfram Sang [mailto:w.sang at pengutronix.de]
Sent: Wednesday, 1 September, 2010 18:15
To: Zhu Richard-R65037
Cc: linux-mmc at vger.kernel.org; kernel at pengutronix.de; linux-arm-kernel at lists.infradead.org
Subject: Re: A serial patchs that support FSL's eSDHC
Quoted 3 lines · Richard Zhu
Can you help me to review the following serial patchs, that enable the
sdhci driver to support FSL's eSDHC on i.MX family.
I see two major problems: First, you often modify sdhci.c to work around the hardware-quirks. See sdhci-of-esdhc.c how it can be handled in a seperate source-file and keep sdhci.c clean. (While at it, what is common between the of-driver and the platform-driver should be shared). Second, your platform-driver is a complete one, but we have a platform core meanwhile (sdhci-pltfm.c). Please use that.
Kind regards,
Wolfram
Signature · 4 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Hi Richard,
(going back to the list. A few more eyes during the process will surely help :))
Quoted 10 lines · On Fri, Sep 03, 2010 at 06:26:05PM +0800, Zhu Richard-R65037 wrote:
I encounter some problems when I merge my eSDHC driver into
sdhci-pltfm.cdriver.
In the eSDHC solution there is a little complex in the driver implementation refer to the HW/IC design.
One private struct such assdhci_fsl_hostin my original codes is needed, and the board specified platform data (such
asimxmmc_platform_datastruct) is mandatory required too.
sdhci-pltfm.cdriver can't provide such kinds of APIs. Do you have any suggestions?
Well, I think we can do without. In a few minutes, I will post an RFC which I just hacked. Please have a look at it, and say if you have comments or suggestions. Hopefully you'll agree that this approach is a lot less intrusive. I will mainly concentrate on the driver. For the platform part, Uwe already gave a few comments. I will also reply to some of your patches to clarify some issues.
Regards,
Wolfram
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100906/de6ef16d/attachment.sig>