Re: tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/2/15 Yusuke Goda <goda.yusuke@xxxxxxxxxxx>:

> diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> index 9cb1834..695199a 100644
> --- a/include/linux/mfd/tmio.h
> +++ b/include/linux/mfd/tmio.h
> @@ -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:

> diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
> (...)
>        mmc->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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux