Update MMC response types
RFC PATCH 1/1 Update MMC response types
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.
Signature · 7 lines
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: [email protected]
This patch is a fix in order to update MMC response types. This modification is needed to allow SD card support on OMAP platforms.
drivers/mmc/omap.c +11 -5
@@ -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 ; }
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines · Pierre Ossman
Quoted 11 lines · Carlos Aguiar
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.
Quoted 4 lines
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
Quoted 4 lines · Tony Lindgren
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
Signature · 5 lines
-- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org
Quoted 11 lines · Carlos Aguiar
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
Signature · 5 lines
-- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org