[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinOZS8CT7Ov1R5Xa680jyEbC6LG3yPzUFFPQUBh@mail.gmail.com>
Date: Mon, 3 Jan 2011 11:10:32 +0100
From: Pierre Tardy <tardyp@...il.com>
To: Philip Rakity <prakity@...vell.com>
Cc: Linus Walleij <linus.ml.walleij@...il.com>,
"Gao, Yunpeng" <yunpeng.gao@...el.com>,
"Yuan, Hang" <hang.yuan@...el.com>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Chris Ball <cjb@...top.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Alan Cox <alan@...ux.intel.com>, Takashi Iwai <tiwai@...e.de>,
Maxim Levitsky <maximlevitsky@...il.com>,
Ohad Ben-Cohen <ohad@...ery.com>
Subject: Re: [PATCH] mmc: add MMC_QUIRK_BROKEN_CLK_GATING
On Sun, Jan 2, 2011 at 11:23 PM, Philip Rakity <prakity@...vell.com> wrote:
>
> why not just not compile the the code without clock gating defined ?
>
> and if code cannot run with it clock gating defined do a
> #error ?
The problem here is not related to the drivers that wont compile with
clock gating.
sdio clock gating, is that you gate the sdio bus clock when you dont need it.
Because some vendors sdio card IP is bad, some card are not working
properly when you do this (Their interrupt logic might need a clock to
trigger interrupt, or they are derivating their own internal clock
from the sdio bus clock). Those card are wrong thus I'm using a quirk
to deal with them.
The problem is that we still dont know how many card are wrong and
what are they. So that's why I'm making it default for all sdio card
at the moment.
When we'll have more experience on this, we can switch the behaviour,
and make it a default off.
> Also from the diff I think you patch changes the behavior of SD/eMMC cards which may not be what you want .
The quirk is only set for sdio cards, which is, I think, equivalent to
the previous implementation.
- if (mmc_card_sdio(card))
- return false;
-
- return true;
+ return !(card->quirks & MMC_QUIRK_BROKEN_CLK_GATING);
@@ -785,6 +785,12 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
+ card->quirks |= MMC_QUIRK_BROKEN_CLK_GATING;
This code is made to propose a solution for allowing drivers owner
that *knows* that their card work with CG, to disable the quirk in
their probe function.
Pierre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists