• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef UAPI_MMC_CORE_H
2 #define UAPI_MMC_CORE_H
3 
4 #define MMC_RSP_PRESENT	(1 << 0)
5 #define MMC_RSP_136	(1 << 1)		/* 136 bit response */
6 #define MMC_RSP_CRC	(1 << 2)		/* expect valid crc */
7 #define MMC_RSP_BUSY	(1 << 3)		/* card may send busy */
8 #define MMC_RSP_OPCODE	(1 << 4)		/* response contains opcode */
9 
10 #define MMC_CMD_MASK	(3 << 5)		/* non-SPI command type */
11 #define MMC_CMD_AC	(0 << 5)
12 #define MMC_CMD_ADTC	(1 << 5)
13 #define MMC_CMD_BC	(2 << 5)
14 #define MMC_CMD_BCR	(3 << 5)
15 
16 #define MMC_RSP_SPI_S1	(1 << 7)		/* one status byte */
17 #define MMC_RSP_SPI_S2	(1 << 8)		/* second byte */
18 #define MMC_RSP_SPI_B4	(1 << 9)		/* four data bytes */
19 #define MMC_RSP_SPI_BUSY (1 << 10)		/* card may send busy */
20 
21 /*
22  * These are the native response types, and correspond to valid bit
23  * patterns of the above flags.  One additional valid pattern
24  * is all zeros, which means we don't expect a response.
25  */
26 #define MMC_RSP_NONE	(0)
27 #define MMC_RSP_R1	(MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
28 #define MMC_RSP_R1B	(MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
29 #define MMC_RSP_R2	(MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
30 #define MMC_RSP_R3	(MMC_RSP_PRESENT)
31 #define MMC_RSP_R4	(MMC_RSP_PRESENT)
32 #define MMC_RSP_R5	(MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
33 #define MMC_RSP_R6	(MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
34 #define MMC_RSP_R7	(MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
35 
36 #endif /* UAPI_MMC_CORE_H */
37