Re: [PATCH] mmc: add MMC_QUIRK_BROKEN_CLK_GATING

From: Linus Walleij
Date: Tue Jan 04 2011 - 18:52:34 EST


2011/1/2 Pierre Tardy <tardyp@xxxxxxxxx>:

> Some sdio card are not following sdio standard, and does not work
> when the sdio bus's clock is gated

Seem to me like it's pretty straight-forward and will work...
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>

> diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
> index 82f4b90..6df1ead 100644
> --- a/drivers/mmc/core/sdio.c
> +++ b/drivers/mmc/core/sdio.c
> @@ -785,6 +785,12 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
>
>        mmc_release_host(host);
>
> +        /*
> +         * see comments in mmc_host_may_gate_card()
> +         * this can be overidden by function drivers if they know that
> +         * their sdio card works with clock gating
> +         */
> +        card->quirks |= MMC_QUIRK_BROKEN_CLK_GATING;

...so the function driver will do something like this:

/* May gate clock */
card->quirks &= ~MMC_QUIRK_BROKEN_CLK_GATING;

Do you have a candidate function driver to do this ...?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/