/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * include/linux/mmc/sd.h * * Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved. */ #ifndef LINUX_MMC_SD_H #define LINUX_MMC_SD_H /* SD commands type argument response */ /* class 0 */ /* This is basically the same command as for MMC with some quirks. */ #define SD_SEND_RELATIVE_ADDR … #define SD_SEND_IF_COND … #define SD_SWITCH_VOLTAGE … /* class 10 */ #define SD_SWITCH … /* class 5 */ #define SD_ERASE_WR_BLK_START … #define SD_ERASE_WR_BLK_END … /* Application commands */ #define SD_APP_SET_BUS_WIDTH … #define SD_APP_SD_STATUS … #define SD_APP_SEND_NUM_WR_BLKS … #define SD_APP_OP_COND … #define SD_APP_SEND_SCR … /* class 11 */ #define SD_READ_EXTR_SINGLE … #define SD_WRITE_EXTR_SINGLE … /* OCR bit definitions */ #define SD_OCR_S18R … #define SD_ROCR_S18A … #define SD_OCR_XPC … #define SD_OCR_CCS … /* * SD_SWITCH argument format: * * [31] Check (0) or switch (1) * [30:24] Reserved (0) * [23:20] Function group 6 * [19:16] Function group 5 * [15:12] Function group 4 * [11:8] Function group 3 * [7:4] Function group 2 * [3:0] Function group 1 */ /* * SD_SEND_IF_COND argument format: * * [31:12] Reserved (0) * [11:8] Host Voltage Supply Flags * [7:0] Check Pattern (0xAA) */ /* * SCR field definitions */ #define SCR_SPEC_VER_0 … #define SCR_SPEC_VER_1 … #define SCR_SPEC_VER_2 … /* * SD bus widths */ #define SD_BUS_WIDTH_1 … #define SD_BUS_WIDTH_4 … /* * SD_SWITCH mode */ #define SD_SWITCH_CHECK … #define SD_SWITCH_SET … /* * SD_SWITCH function groups */ #define SD_SWITCH_GRP_ACCESS … /* * SD_SWITCH access modes */ #define SD_SWITCH_ACCESS_DEF … #define SD_SWITCH_ACCESS_HS … /* * Erase/discard */ #define SD_ERASE_ARG … #define SD_DISCARD_ARG … #endif /* LINUX_MMC_SD_H */