* [RFC][PATCH] Update MMC response types
@ 2006-12-18 15:34 Carlos Aguiar
[not found] ` <4586D996.40009@drzeus.cx>
2007-01-15 5:35 ` Pierre Ossman
0 siblings, 2 replies; 4+ messages in thread
From: Carlos Aguiar @ 2006-12-18 15:34 UTC (permalink / raw)
To: Tony Lindgren, Juha Yrjola, Pierre Ossman, linux-omap-open-source
Cc: Ilias Biris
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
Hi folks,
This patch is a fix in order to update MMC response types. This modification
is needed to allow SD card support in OMAP platforms.
It's based on previously work from Juha Yrjola.
This modification was tested in H2 and H3 OMAP platforms using an
Transcend SD card 512MB.
BR,
Carlos.
--
Carlos Eduardo
Software Engineer
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br
[-- Attachment #2: mmc_rsp.diff --]
[-- Type: text/plain, Size: 1398 bytes --]
This patch is a fix in order to update MMC response types. This modification is
needed to allow SD card support on OMAP platforms.
Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Yuha Yrjola <juha.yrjola@solidboot.com>
Index: linux-omap-git/drivers/mmc/omap.c
===================================================================
--- linux-omap-git.orig/drivers/mmc/omap.c 2006-11-24 09:45:44.000000000 -0400
+++ linux-omap-git/drivers/mmc/omap.c 2006-12-18 06:02:53.000000000 -0400
@@ -92,7 +92,6 @@
#define DRIVER_NAME "mmci-omap"
-#define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))
/* Specifies how often in millisecs to poll for card status changes
* when the cover switch is open */
@@ -205,18 +204,25 @@ mmc_omap_start_command(struct mmc_omap_h
cmdtype = 0;
/* Our hardware needs to know exact type */
- switch (RSP_TYPE(mmc_resp_type(cmd))) {
- case RSP_TYPE(MMC_RSP_R1):
+ switch (mmc_resp_type(cmd)) {
+ case MMC_RSP_NONE:
+ break;
+ case MMC_RSP_R1:
+ case MMC_RSP_R1B:
/* resp 1, resp 1b */
resptype = 1;
break;
- case RSP_TYPE(MMC_RSP_R2):
+ case MMC_RSP_R2:
resptype = 2;
break;
- case RSP_TYPE(MMC_RSP_R3):
+ case MMC_RSP_R3:
resptype = 3;
break;
+ case MMC_RSP_R6:
+ resptype = 6;
+ break;
default:
+ dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd));
break;
}
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH] Update MMC response types
[not found] ` <4586D996.40009@drzeus.cx>
@ 2007-01-09 23:56 ` Tony Lindgren
2007-01-10 5:46 ` Pierre Ossman
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2007-01-09 23:56 UTC (permalink / raw)
To: Pierre Ossman; +Cc: linux-omap-open-source, Ilias Biris
* Pierre Ossman <drzeus-list@drzeus.cx> [061218 10:10]:
> Carlos Aguiar wrote:
> > Hi folks,
> >
> > This patch is a fix in order to update MMC response types. This modification
> > is needed to allow SD card support in OMAP platforms.
> >
> > It's based on previously work from Juha Yrjola.
> >
> > This modification was tested in H2 and H3 OMAP platforms using an
> > Transcend SD card 512MB.
> >
> >
>
> I'm no fan of coding response types into drivers, but I can understand
> that you're using hardware with a crappy vendor which doesn't properly
> document what the hardware does. This patch at least makes things more
> readable. Ack from me.
Pushing this to linux-omap tree. Pierre, is this in your MMC queue
already?
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH] Update MMC response types
2007-01-09 23:56 ` Tony Lindgren
@ 2007-01-10 5:46 ` Pierre Ossman
0 siblings, 0 replies; 4+ messages in thread
From: Pierre Ossman @ 2007-01-10 5:46 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source, Ilias Biris
Tony Lindgren wrote:
> Pushing this to linux-omap tree. Pierre, is this in your MMC queue
> already?
>
>
Nope. It was marked as RFC, so I just commented on it.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH] Update MMC response types
2006-12-18 15:34 [RFC][PATCH] Update MMC response types Carlos Aguiar
[not found] ` <4586D996.40009@drzeus.cx>
@ 2007-01-15 5:35 ` Pierre Ossman
1 sibling, 0 replies; 4+ messages in thread
From: Pierre Ossman @ 2007-01-15 5:35 UTC (permalink / raw)
To: Carlos Aguiar; +Cc: linux-omap-open-source, Ilias Biris
Carlos Aguiar wrote:
> Hi folks,
>
> This patch is a fix in order to update MMC response types. This modification
> is needed to allow SD card support in OMAP platforms.
>
> It's based on previously work from Juha Yrjola.
>
> This modification was tested in H2 and H3 OMAP platforms using an
> Transcend SD card 512MB.
>
>
Hmm... Actually, this patch isn't entirely needed as of the next release
as R6 is being redefined to be identical to R1 (as it should really). So
I'll make sure both make the cut for 2.6.20.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-15 5:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 15:34 [RFC][PATCH] Update MMC response types Carlos Aguiar
[not found] ` <4586D996.40009@drzeus.cx>
2007-01-09 23:56 ` Tony Lindgren
2007-01-10 5:46 ` Pierre Ossman
2007-01-15 5:35 ` Pierre Ossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox