[PATCH v4 1/5] mmc: dw_mmc: Add "disable-wp" device tree property
Olof Johansson
olof at lixom.net
Tue Jan 15 17:20:04 EST 2013
On Fri, Jan 11, 2013 at 09:03:50AM -0800, Doug Anderson wrote:
> The "disable-wp" property is used to specify that a given SD card slot
> doesn't have a concept of write protect. This eliminates the need for
> special case code for SD slots that should never be write protected
> (like a micro SD slot or a dev board).
>
> The dw_mmc driver is special in needing to specify "disable-wp"
> because the lack of a "wp-gpios" property means to use the special
> purpose write protect line. On some other mmc devices the lack of
> "wp-gpios" means that write protect should be disabled.
>
> Signed-off-by: Doug Anderson <dianders at chromium.org>
> Acked-by: Seungwon Jeon <tgih.jun at samsung.com>
Acked-by: Olof Johansson <olof at lixom.net>
Nit below.
> @@ -825,7 +828,13 @@ static int dw_mci_get_ro(struct mmc_host *mmc)
> struct dw_mci_board *brd = slot->host->pdata;
>
> /* Use platform get_ro function, else try on board write protect */
> - if (brd->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT)
> +
> + /*
> + * NOTE: DW_MCI_QUIRK_NO_WRITE_PROTECT will be removed in a future
> + * patch in the series once reference to it is removed.
> + */
> + if ((brd->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT) ||
> + (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT))
Given that it never worked properly, you could have nuked it first and avoid
the extra churn. Still, not a strong enough reason to respin the series, IMHO.
-Olof
More information about the devicetree-discuss
mailing list