linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [MMC] Indicate that R1/R1b contains command opcode
@ 2006-01-06 18:38 Pierre Ossman
  2006-01-09 22:54 ` Russell King
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre Ossman @ 2006-01-06 18:38 UTC (permalink / raw)
  To: rmk+lkml; +Cc: Pierre Ossman, linux-kernel

Some controllers actually check the first byte of the response (most don't).
This byte contains the command opcode for R1/R1b and all 1:s for other types.
The difference must be indicated to the controller so it knows which reply
to expect.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
---

 include/linux/mmc/mmc.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index aef6042..b101f9e 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -27,14 +27,15 @@ struct mmc_command {
 #define MMC_RSP_MASK	(3 << 0)
 #define MMC_RSP_CRC	(1 << 3)		/* expect valid crc */
 #define MMC_RSP_BUSY	(1 << 4)		/* card may send busy */
+#define MMC_RSP_OPCODE	(1 << 5)		/* response contains opcode */
 
 /*
  * These are the response types, and correspond to valid bit
  * patterns of the above flags.  One additional valid pattern
  * is all zeros, which means we don't expect a response.
  */
-#define MMC_RSP_R1	(MMC_RSP_SHORT|MMC_RSP_CRC)
-#define MMC_RSP_R1B	(MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY)
+#define MMC_RSP_R1	(MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R1B	(MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
 #define MMC_RSP_R2	(MMC_RSP_LONG|MMC_RSP_CRC)
 #define MMC_RSP_R3	(MMC_RSP_SHORT)
 #define MMC_RSP_R6	(MMC_RSP_SHORT|MMC_RSP_CRC)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [MMC] Indicate that R1/R1b contains command opcode
  2006-01-06 18:38 [PATCH] [MMC] Indicate that R1/R1b contains command opcode Pierre Ossman
@ 2006-01-09 22:54 ` Russell King
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2006-01-09 22:54 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: Pierre Ossman, linux-kernel

On Fri, Jan 06, 2006 at 07:38:03PM +0100, Pierre Ossman wrote:
> Some controllers actually check the first byte of the response (most don't).
> This byte contains the command opcode for R1/R1b and all 1:s for other types.
> The difference must be indicated to the controller so it knows which reply
> to expect.

Applied, thanks.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-09 22:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-06 18:38 [PATCH] [MMC] Indicate that R1/R1b contains command opcode Pierre Ossman
2006-01-09 22:54 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).