lkml.org 
[lkml]   [2008]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] split MMC_CAP_4_BIT_DATA
On Jan 9, 2008 3:23 PM, Pierre Ossman <drzeus-mmc@drzeus.cx> wrote:
> On Wed, 9 Jan 2008 11:21:40 +0800
> "Cai, Cliff" <Cliff.Cai@analog.com> wrote:
>
> >
> > Hi,all
> >
> > I'd like to say something about this issue.
> > Currently,the blackfin on chip SD host ONLY support 1-bit MMC while
> > support 1-bit/4-bit SD/SDIO.
> > And we want our driver to support both 1-bit MMC and 4-bit SD/SDIO.but
> > the current MMC driver framework
> > Only allow us to set one kind of bus width,either 1-bit or 4-bit.So in
> > order to meet our case,we need more flexible mechanism
> > To inform the upper commom driver to know our situation.
> >
>
> That's just iterating what's already been said. My claim is that 4-bit is 4-bit, regardless if it's MMC or SD. So if you want this patch to go in you need to explain why there is a difference for the blackfin controller.
>

Actually, Blackfin BF54x on-chip SDIO host controller is supposed to
support 1-bit and 4-bit MMC or SD. But in the real platform, when MMC
works at 4-bit mode there will be a FIFO underrun error
(http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3535).
While SD works at 4-bit mode is OK. We believe this is a hardware
issue of the SDIO host controller of BF54x.

We intend to workaround in our own BF54x SDIO host controller driver,
but there is no place for us to determine MMC or SD. One choice is to
hack common code like this:
----
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -358,6 +358,9 @@
/*
* Activate wide bus (if supported).
*/
+/*Currently,Blackfin 54x only support 1 bit MMC,while support 4 bit SD */
+/*So if card type is MMC don't enable 4 bit mode*/
+#if !defined(CONFIG_BF54x)
if ((card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&
(host->caps & MMC_CAP_4_BIT_DATA)) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
@@ -367,7 +370,7 @@

mmc_set_bus_width(card->host, MMC_BUS_WIDTH_4);
}
-
+#endif
if (!oldcard)
host->card = card;

----
Another choice is to use Mike's patch to split the 4-bit mode into
MMC-4-BIT and SD-4-BIT. So we can support 1-bit and 4-bit SD as well
as 1-bit MMC.

Thanks
-Bryan Wu


\
 
 \ /
  Last update: 2008-01-09 17:49    [W:0.075 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site