diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-07 12:03:13 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-07 12:03:13 +0100 |
commit | 0ee6847f7b6d396d3756f6ecd0781a00b9cca980 (patch) | |
tree | 1f1bed639ac0bbc9091685538c791b4648f4c342 /include/mci.h | |
parent | 61b62f6d33d55c9b89ba8a6fbae84cb9c33e342a (diff) | |
parent | 8b3d10265da20b8be6138799cee704d53dee1c63 (diff) | |
download | barebox-0ee6847f7b6d396d3756f6ecd0781a00b9cca980.tar.gz barebox-0ee6847f7b6d396d3756f6ecd0781a00b9cca980.tar.xz |
Merge branch 'next'
Diffstat (limited to 'include/mci.h')
-rw-r--r-- | include/mci.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/mci.h b/include/mci.h index 69cffe8d3f..d3b3082fc1 100644 --- a/include/mci.h +++ b/include/mci.h @@ -31,6 +31,7 @@ #define _MCI_H_ #include <linux/list.h> +#include <block.h> /* Firmware revisions for SD cards */ #define SD_VERSION_SD 0x20000 @@ -49,6 +50,7 @@ #define MMC_MODE_HS 0x001 #define MMC_MODE_HS_52MHz 0x010 +#define MMC_CAP_SPI 0x020 #define MMC_MODE_4BIT 0x100 #define MMC_MODE_8BIT 0x200 @@ -56,6 +58,12 @@ #define IS_SD(x) (x->version & SD_VERSION_SD) +#ifdef CONFIG_MCI_SPI +#define mmc_host_is_spi(host) ((host)->host_caps & MMC_CAP_SPI) +#else +#define mmc_host_is_spi(host) 0 +#endif + #define MMC_DATA_READ 1 #define MMC_DATA_WRITE 2 @@ -78,6 +86,8 @@ #define MMC_CMD_WRITE_SINGLE_BLOCK 24 #define MMC_CMD_WRITE_MULTIPLE_BLOCK 25 #define MMC_CMD_APP_CMD 55 +#define MMC_CMD_SPI_READ_OCR 58 +#define MMC_CMD_SPI_CRC_ON_OFF 59 #define SD_CMD_SEND_RELATIVE_ADDR 3 #define SD_CMD_SWITCH_FUNC 6 @@ -155,6 +165,15 @@ #define R1_ILLEGAL_COMMAND (1 << 22) #define R1_APP_CMD (1 << 5) +#define R1_SPI_IDLE (1 << 0) +#define R1_SPI_ERASE_RESET (1 << 1) +#define R1_SPI_ILLEGAL_COMMAND (1 << 2) +#define R1_SPI_COM_CRC (1 << 3) +#define R1_SPI_ERASE_SEQ (1 << 4) +#define R1_SPI_ADDRESS (1 << 5) +#define R1_SPI_PARAMETER (1 << 6) +#define R1_SPI_ERROR (1 << 7) + /* response types */ #define MMC_RSP_PRESENT (1 << 0) #define MMC_RSP_136 (1 << 1) /* 136 bit response */ @@ -194,7 +213,6 @@ struct mci_data { /** host information */ struct mci_host { struct device_d *hw_dev; /**< the host MCI hardware device */ - struct device_d dev; /**< our device */ unsigned voltages; unsigned host_caps; /**< Host's interface capabilities, refer MMC_VDD_* */ unsigned f_min; /**< host interface lower limit */ @@ -212,6 +230,7 @@ struct mci_host { /** MMC/SD and interface instance information */ struct mci { + struct block_device blk; /**< the blockdevice for the card */ unsigned version; /** != 0 when a high capacity card is connected (OCR -> OCR_HCS) */ int high_capacity; |