All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>, Ian Molton <spyro@f2s.com>,
	Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH][MMC][1/6] Secure Digital (SD) support : protocol
Date: Sun, 06 Mar 2005 02:37:01 +0100	[thread overview]
Message-ID: <422A5EBD.3050307@drzeus.cx> (raw)
In-Reply-To: <422A5E1C.2050107@drzeus.cx>

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

Protocol definitions.

The basic commands needed for the later patches. The R1_APP_CMD seems to 
be misdefined in protocol.h so this patch changes it.


[-- Attachment #2: mmc-sd-protocol.patch --]
[-- Type: text/x-patch, Size: 1778 bytes --]

Index: linux-sd/include/linux/mmc/mmc.h
===================================================================
--- linux-sd/include/linux/mmc/mmc.h	(revision 135)
+++ linux-sd/include/linux/mmc/mmc.h	(working copy)
@@ -37,6 +37,7 @@
 #define MMC_RSP_R1B	(MMC_RSP_SHORT|MMC_RSP_CRC|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)
 
 	unsigned int		retries;	/* max number of retries */
 	unsigned int		error;		/* command error */
Index: linux-sd/include/linux/mmc/protocol.h
===================================================================
--- linux-sd/include/linux/mmc/protocol.h	(revision 135)
+++ linux-sd/include/linux/mmc/protocol.h	(working copy)
@@ -76,6 +76,16 @@
 #define MMC_APP_CMD              55   /* ac   [31:16] RCA        R1  */
 #define MMC_GEN_CMD              56   /* adtc [0] RD/WR          R1b */
 
+/* SD commands                           type  argument     response */
+  /* class 8 */
+/* This is basically the same command as for MMC with some quirks. */
+#define SD_SEND_RELATIVE_ADDR     3   /* ac                      R6  */
+
+  /* Application commands */
+#define SD_APP_SET_BUS_WIDTH      6   /* ac   [1:0] bus width    R1  */
+#define SD_APP_OP_COND           41   /* bcr  [31:0] OCR         R3  */
+#define SD_APP_SEND_SCR          51   /* adtc                    R1  */
+
 /*
   MMC status in R1
   Type
@@ -113,7 +123,7 @@
 #define R1_STATUS(x)            (x & 0xFFFFE000)
 #define R1_CURRENT_STATE(x)    	((x & 0x00001E00) >> 9)	/* sx, b (4 bits) */
 #define R1_READY_FOR_DATA	(1 << 8)	/* sx, a */
-#define R1_APP_CMD		(1 << 7)	/* sr, c */
+#define R1_APP_CMD		(1 << 5)	/* sr, c */
 
 /* These are unpacked versions of the actual responses */
 

  reply	other threads:[~2005-03-06  1:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 12:22 [PATCH][MMC] Secure Digital (SD) support Pierre Ossman
2005-03-04 13:22 ` Pavel Machek
2005-03-04 15:00 ` Marcel Holtmann
2005-03-04 15:12   ` Pierre Ossman
2005-03-04 16:22     ` Marcel Holtmann
2005-03-04 21:04     ` Ian Molton
2005-03-05 11:37 ` Russell King
2005-03-05 12:23   ` Pierre Ossman
2005-03-05 12:44     ` Russell King
2005-03-05 13:46       ` Pierre Ossman
2005-03-05 16:24         ` Richard Purdie
2005-05-06 14:15         ` Pierre Ossman
2005-03-06  1:34       ` [PATCH][MMC][0/6] " Pierre Ossman
2005-03-06  1:37         ` Pierre Ossman [this message]
2005-03-19 16:35           ` [PATCH][MMC][1/6] Secure Digital (SD) support : protocol Russell King
2005-03-06  1:44         ` [PATCH][MMC][2/6] Secure Digital (SD) support : init Pierre Ossman
2005-03-06  1:47         ` [PATCH][MMC][3/6] Secure Digital (SD) support : ro Pierre Ossman
2005-03-06  1:50         ` [PATCH][MMC][4/6] Secure Digital (SD) support : SCR Pierre Ossman
2005-03-06  1:52         ` [PATCH][MMC][5/6] Secure Digital (SD) support : sysfs Pierre Ossman
2005-03-06  1:57         ` [PATCH][MMC][6/6] Secure Digital (SD) support : wide bus Pierre Ossman
2005-03-12 17:35         ` [PATCH][MMC][7/6] Secure Digital (SD) support : Copyright Pierre Ossman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=422A5EBD.3050307@drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rpurdie@rpsys.net \
    --cc=spyro@f2s.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.