aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAndrei Warkentin <andreiw@motorola.com>2011-04-11 19:10:25 -0400
committerChris Ball <cjb@laptop.org>2011-05-24 21:01:21 -0400
commit371a689f64b0da140c3bcd3f55305ffa1c3a58ef (patch)
treec0dff82d668378d395cb22ce33cd93e6dafef9eb /include/linux
parent1a258db6f396e26c2c00b19c0107a891895d4584 (diff)
mmc: MMC boot partitions support.
Allows device MMC boot partitions to be accessed. MMC partitions are treated effectively as separate block devices on the same MMC card. Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/card.h4
-rw-r--r--include/linux/mmc/mmc.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 937f852cf01e..0c7a58b14343 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -48,7 +48,8 @@ struct mmc_ext_csd {
48 u8 sec_feature_support; 48 u8 sec_feature_support;
49 u8 rel_sectors; 49 u8 rel_sectors;
50 u8 rel_param; 50 u8 rel_param;
51 u8 bootconfig; 51 u8 part_config;
52 unsigned int part_time; /* Units: ms */
52 unsigned int sa_timeout; /* Units: 100ns */ 53 unsigned int sa_timeout; /* Units: 100ns */
53 unsigned int hs_max_dtr; 54 unsigned int hs_max_dtr;
54 unsigned int sectors; 55 unsigned int sectors;
@@ -61,6 +62,7 @@ struct mmc_ext_csd {
61 bool enhanced_area_en; /* enable bit */ 62 bool enhanced_area_en; /* enable bit */
62 unsigned long long enhanced_area_offset; /* Units: Byte */ 63 unsigned long long enhanced_area_offset; /* Units: Byte */
63 unsigned int enhanced_area_size; /* Units: KB */ 64 unsigned int enhanced_area_size; /* Units: KB */
65 unsigned int boot_size; /* in bytes */
64}; 66};
65 67
66struct sd_scr { 68struct sd_scr {
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 390aa6eef676..373b2bf5e5b5 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -257,19 +257,21 @@ struct _mmc_csd {
257#define EXT_CSD_PARTITION_SUPPORT 160 /* RO */ 257#define EXT_CSD_PARTITION_SUPPORT 160 /* RO */
258#define EXT_CSD_WR_REL_PARAM 166 /* RO */ 258#define EXT_CSD_WR_REL_PARAM 166 /* RO */
259#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ 259#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */
260#define EXT_CSD_BOOT_CONFIG 179 /* R/W */ 260#define EXT_CSD_PART_CONFIG 179 /* R/W */
261#define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ 261#define EXT_CSD_ERASED_MEM_CONT 181 /* RO */
262#define EXT_CSD_BUS_WIDTH 183 /* R/W */ 262#define EXT_CSD_BUS_WIDTH 183 /* R/W */
263#define EXT_CSD_HS_TIMING 185 /* R/W */ 263#define EXT_CSD_HS_TIMING 185 /* R/W */
264#define EXT_CSD_REV 192 /* RO */ 264#define EXT_CSD_REV 192 /* RO */
265#define EXT_CSD_STRUCTURE 194 /* RO */ 265#define EXT_CSD_STRUCTURE 194 /* RO */
266#define EXT_CSD_CARD_TYPE 196 /* RO */ 266#define EXT_CSD_CARD_TYPE 196 /* RO */
267#define EXT_CSD_PART_SWITCH_TIME 199 /* RO */
267#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ 268#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */
268#define EXT_CSD_S_A_TIMEOUT 217 /* RO */ 269#define EXT_CSD_S_A_TIMEOUT 217 /* RO */
269#define EXT_CSD_REL_WR_SEC_C 222 /* RO */ 270#define EXT_CSD_REL_WR_SEC_C 222 /* RO */
270#define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ 271#define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */
271#define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */ 272#define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */
272#define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */ 273#define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */
274#define EXT_CSD_BOOT_MULT 226 /* RO */
273#define EXT_CSD_SEC_TRIM_MULT 229 /* RO */ 275#define EXT_CSD_SEC_TRIM_MULT 229 /* RO */
274#define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ 276#define EXT_CSD_SEC_ERASE_MULT 230 /* RO */
275#define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ 277#define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */
@@ -281,6 +283,10 @@ struct _mmc_csd {
281 283
282#define EXT_CSD_WR_REL_PARAM_EN (1<<2) 284#define EXT_CSD_WR_REL_PARAM_EN (1<<2)
283 285
286#define EXT_CSD_PART_CONFIG_ACC_MASK (0x7)
287#define EXT_CSD_PART_CONFIG_ACC_BOOT0 (0x1)
288#define EXT_CSD_PART_CONFIG_ACC_BOOT1 (0x2)
289
284#define EXT_CSD_CMD_SET_NORMAL (1<<0) 290#define EXT_CSD_CMD_SET_NORMAL (1<<0)
285#define EXT_CSD_CMD_SET_SECURE (1<<1) 291#define EXT_CSD_CMD_SET_SECURE (1<<1)
286#define EXT_CSD_CMD_SET_CPSECURE (1<<2) 292#define EXT_CSD_CMD_SET_CPSECURE (1<<2)