tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support
Subsystems (3)
Enable MMC_CAP_MMC_HIGHSPEED support in the tmio_mmc driver if pdata->cap_highspeed is set.
--- drivers/mmc/host/tmio_mmc.c | 2 ++ include/linux/mfd/tmio.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
drivers/mmc/host/tmio_mmc.c +2 -0
@@ -550,6 +550,8 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) mmc->ops = &tmio_mmc_ops; mmc->caps =MMC_CAP_4_BIT_DATA ; +if (pdata->cap_highspeed) + mmc->caps |=MMC_CAP_MMC_HIGHSPEED ; mmc->f_max = pdata->hclk; mmc->f_min = mmc->f_max /512 ; mmc->ocr_avail =MMC_VDD_32_33 |MMC_VDD_33_34 ;
include/linux/mfd/tmio.h +1 -0
@@ -60,6 +60,7 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);*/ struct tmio_mmc_data {const unsigned int hclk; +int cap_highspeed;void (*set_pwr)(struct platform_device *host,int state);void (*set_clk_div)(struct platform_device *host,int state); };
Signature · 1 line
1.6.4.3
Magnus Damm
Acked-byHi Goda-san,
2010/2/15 Yusuke Goda <[email protected]>:
Quoted 4 lines
Enable
MMC_CAP_MMC_HIGHSPEEDsupport in thetmio_mmcdriver ifpdata->cap_highspeedis set.Signed-off-by Yusuke Goda <[email protected]>
Thanks for your patch, it looks fine to me.
If no one objects then I'll hack up a patch for the sh_mobile_sdhi driver that sets pdata->cah_highspeed to 1.
Cheers,
/ magnus
Quoted 6 lines · On Mon, 15 Feb 2010 21:15:49 +0900 Magnus Damm <[email protected]> wrote:
Hi Goda-san,
2010/2/15 Yusuke Goda <[email protected]>:
Quoted 3 lines
Enable
MMC_CAP_MMC_HIGHSPEEDsupport in thetmio_mmcdriver ifpdata->cap_highspeedis set.
Quoted 8 lines
Quoted 1 line
Signed-off-by Yusuke Goda <[email protected]>Thanks for your patch, it looks fine to me.
Acked-by Magnus Damm <[email protected]>If no one objects then I'll hack up a patch for the
sh_mobile_sdhidriver that setspdata->cah_highspeedto 1.
Would prefer to see the interrelated patches in a single series please.
Linus Walleij's suggestion sounded good, too.
2010/2/15 Yusuke Goda <[email protected]>:
include/linux/mfd/tmio.h void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); · line 63
Quoted 9 lines
include/linux/mfd/tmio.h +1
-0@@ -60,6 +60,7 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);*/ struct tmio_mmc_data { const unsigned int hclk; + int cap_highspeed;
If this is really a bool, then declare it as a bool.
But isn't it better to be able to specify arbitary caps for the platform? So make this an
unsigned long capabilities;
instead? Else you will get in trouble the day you want to tag on something else (like MMC_CAP_SD_HIGHSPEED), and it doesn't make sense to extend the struct with bools for just about everything.
Such a change would result in:
drivers/mmc/host/tmio_mmc.c static int __devinit tmio_mmc_probe(struct platform_device *dev) · line 554
Quoted 5 lines
drivers/mmc/host/tmio_mmc.c +2
-0mmc->caps =MMC_CAP_4_BIT_DATA ; +if (pdata->cap_highspeed) + mmc->caps |=MMC_CAP_MMC_HIGHSPEED ;
mmc->caps |= pdata->capabilities;
..and then set .capabilities to MMC_CAP_MMC_HIGHSPEED in the platform data.
Linus