summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRyan QIAN <b32804@freescale.com>2012-01-07 12:32:40 +0800
committerJustin Waters <justin.waters@timesys.com>2012-07-03 16:56:35 -0400
commit11dc35fcc3c994fcdca6cd36974bb6dca8c880ff (patch)
treebdced7d6ef953b1d69c43a6e91af424b06b1e8fd /include
parentfabeffb57a82cca26f440dd3ac7dfa7344174ce5 (diff)
ENGR00173284 merge "eMMC: Configure boot_partition_enable"
ENGR126228 eMMC: Configure boot_partition_enable Enable the configurations of the boot enable on the eMMC cards. Add the interface that used to configure the boot_bus_width In order to make sure that the re-read the ext-csd of card can be completed successfully, add the method to wait for the finish of the busy state. NOTE: The following are the valid inputs when configure the boot bus width of the eMMC cards. +--------------------------------------------------------------------+ | Bit7 Bit6 Bit5 | Bit4 Bit3 | Bit2 | Bit1 Bit0 | |----------------|----------------------------------|----------------| | X | BOOT_MODE | RESET_BOOT_BUS_WIDTH | BOOT_BUS_WIDTH | +--------------------------------------------------------------------+ Bit [4:3] : BOOT_MODE (non-volatile) 0x0 : Use single data rate + backward compatible timings in boot operation (default) 0x1 : Use single data rate + high speed timings in boot operation mode 0x2 : Use dual data rate in boot operation 0x3 : Reserved Bit [2]: RESET_BOOT_BUS_WIDTH (non-volatile) 0x0 : Reset bus width to x1, single data rate and backward compatible timings after boot operation (default) 0x1 : Retain boot bus width and boot mode after boot operation Bit[1:0] : BOOT_BUS_WIDTH (non-volatile) 0x0 : x1 (sdr) or x4 (ddr) bus width in boot operation mode (default) 0x1 : x4 (sdr/ddr) bus width in boot operation mode 0x2 : x8 (sdr/ddr) bus width in boot operation mode 0x3 : Reserved The following are the valid inputs when configure the boot partitions of the eMMC cards. +------------------------------------------------------------+ | Bit7 | Bit6 | Bit5 Bit4 Bit3 | Bit2 Bit1 Bit0 | |------|----------|-----------------------|------------------| | X | BOOT_ACK | BOOT_PARTITION_ENABLE | PARTITION_ACCESS | +------------------------------------------------------------+ Bit7: Reserved Bit6: always set to vaule '1' when boot_part is enabled Bit[5:3]: 0x0 : Device not boot enabled (default) 0x1 : Boot partition 1 enabled for boot 0x2 : Boot partition 2 enabled for boot 0x7 : User area enabled for boot Bit[2:0]: 0x0 : No access to boot partition (default) 0x1 : R/W boot partition 1 0x2 : R/W boot partition 2 So only the '0, 1, 2; 8, 9, 10; 16, 17, 18; 56, 57, 58' are valid parameters when configure the boot_partiton. Signed-off-by: Richard Zhu <r65037@freescale.com> Signed-off-by: Ryan QIAN <b32804@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h1
-rw-r--r--include/linux/mmc/mmc.h24
2 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index cd447f8e178e..686434404651 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -80,6 +80,7 @@ struct mmc_ext_csd {
#define MMC_DDR_MODE_MASK (0x3<<2)
unsigned char boot_info;
unsigned char boot_config;
+ unsigned char boot_bus_width;
};
struct sd_scr {
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index aaefef6d73d5..d35ed7d9bbad 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -284,6 +284,7 @@ struct _mmc_csd {
#define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */
#define EXT_CSD_TRIM_MULT 232 /* RO */
#define EXT_CSD_BOOT_INFO 228 /* RO, 1 bytes */
+#define EXT_CSD_BOOT_BUS_WIDTH 177
/*
* EXT_CSD field definitions
@@ -319,7 +320,28 @@ struct _mmc_csd {
#define EXT_CSD_SEC_BD_BLK_EN BIT(2)
#define EXT_CSD_SEC_GB_CL_EN BIT(4)
-#define EXT_CSD_BOOT_PARTITION_ACCESS_MASK (0x3)
+#define EXT_CSD_BOOT_BUS_WIDTH_MASK (0x1F)
+#define EXT_CSD_BOOT_BUS_WIDTH_MODE_MASK (0x3 << 3)
+#define EXT_CSD_BOOT_BUS_WIDTH_MODE_SDR_NORMAL (0x0)
+#define EXT_CSD_BOOT_BUS_WIDTH_MODE_SDR_HIGH (0x1)
+#define EXT_CSD_BOOT_BUS_WIDTH_MODE_DDR (0x2)
+#define EXT_CSD_BOOT_BUS_WIDTH_RST_WIDTH (1 << 2)
+#define EXT_CSD_BOOT_BUS_WIDTH_WIDTH_MASK (0x3)
+#define EXT_CSD_BOOT_BUS_WIDTH_1_SDR_4_DDR (0x0)
+#define EXT_CSD_BOOT_BUS_WIDTH_4_SDR_4_DDR (0x1)
+#define EXT_CSD_BOOT_BUS_WIDTH_8_SDR_8_DDR (0x2)
+
+#define EXT_CSD_BOOT_ACK_ENABLE (0x1 << 6)
+#define EXT_CSD_BOOT_PARTITION_ENABLE_MASK (0x7 << 3)
+#define EXT_CSD_BOOT_PARTITION_DISABLE (0x0)
+#define EXT_CSD_BOOT_PARTITION_PART1 (0x1 << 3)
+#define EXT_CSD_BOOT_PARTITION_PART2 (0x2 << 3)
+#define EXT_CSD_BOOT_PARTITION_USER (0x7 << 3)
+
+#define EXT_CSD_BOOT_PARTITION_ACCESS_MASK (0x7)
+#define EXT_CSD_BOOT_PARTITION_ACCESS_DISABLE (0x0)
+#define EXT_CSD_BOOT_PARTITION_ACCESS_PART1 (0x1)
+#define EXT_CSD_BOOT_PARTITION_ACCESS_PART2 (0x2)
/*
* MMC_SWITCH access modes