1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * linux/include/linux/mmc/core.h 4 */ 5 #ifndef LINUX_MMC_CORE_H 6 #define LINUX_MMC_CORE_H 7 8 // clang-format off 9 #include <linux/types.h> 10 11 #define MMC_RSP_PRESENT (1 << 0) 12 #define MMC_RSP_136 (1 << 1) /* 136 bit response */ 13 #define MMC_RSP_CRC (1 << 2) /* expect valid crc */ 14 #define MMC_RSP_BUSY (1 << 3) /* card may send busy */ 15 #define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ 16 17 #define MMC_CMD_AC (0 << 5) 18 #define MMC_CMD_ADTC (1 << 5) 19 20 #define MMC_RSP_SPI_S1 (1 << 7) /* one status byte */ 21 #define MMC_RSP_SPI_BUSY (1 << 10) /* card may send busy */ 22 23 /* 24 * These are the native response types, and correspond to valid bit 25 * patterns of the above flags. One additional valid pattern 26 * is all zeros, which means we don't expect a response. 27 */ 28 #define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) 29 #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) 30 31 /* 32 * These are the SPI response types for MMC, SD, and SDIO cards. 33 * Commands return R1, with maybe more info. Zero is an error type; 34 * callers must always provide the appropriate MMC_RSP_SPI_Rx flags. 35 */ 36 #define MMC_RSP_SPI_R1 (MMC_RSP_SPI_S1) 37 #define MMC_RSP_SPI_R1B (MMC_RSP_SPI_S1|MMC_RSP_SPI_BUSY) 38 39 #endif /* LINUX_MMC_CORE_H */ 40 // clang-format on 41