summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-07-21 21:53:50 +0800
committerYe.Li <B37916@freescale.com>2014-07-21 22:24:53 +0800
commit50ef3db3e4c83bc7b0da05c1dac1af88328d73f4 (patch)
tree442e1f4d7e8f314d841f5341a36107696051770b
parentee8a5a65117f5b7cdcf5d18cc08e50c64a600f6f (diff)
ENGR00323682 MMC: Fixed boot_config overwritten by switch partition
In MMC driver, two variables: boot_config and part_config are used to keep eCSD(179) PARTITION_CONFIG. The part_config is not updated when set new boot_config, which causes the eCSD(179) is overwritten by any following partition switching, so the new boot_config is lost. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit ed6ae43d513d211aba3ab6218feebbccbc33bdbd)
-rw-r--r--drivers/mmc/core/mmc.c11
-rw-r--r--include/linux/mmc/card.h1
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 61fb652dfcfa..bc60d05c1391 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -317,7 +317,6 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
}
card->ext_csd.boot_info = ext_csd[EXT_CSD_BOOT_INFO];
- card->ext_csd.boot_config = ext_csd[EXT_CSD_PART_CONFIG];
card->ext_csd.boot_size = ext_csd[EXT_CSD_BOOT_MULT];
card->ext_csd.boot_bus_width = ext_csd[EXT_CSD_BOOT_BUS_WIDTH];
@@ -667,7 +666,7 @@ static ssize_t mmc_boot_info_show(struct device *dev,
mmc_read_ext_csd(card, ext_csd);
mmc_free_ext_csd(ext_csd);
- partition = (card->ext_csd.boot_config >> 3) & 0x7;
+ partition = (card->ext_csd.part_config >> 3) & 0x7;
width = card->ext_csd.boot_bus_width & 0x3;
mode = (card->ext_csd.boot_bus_width >> 3) & 0x3;
@@ -701,9 +700,9 @@ static ssize_t mmc_boot_info_show(struct device *dev,
card->ext_csd.boot_size * 128,
- card->ext_csd.boot_config,
- !!(card->ext_csd.boot_config & 0x40),
- (card->ext_csd.boot_config & 0x40) ?
+ card->ext_csd.part_config,
+ !!(card->ext_csd.part_config & 0x40),
+ (card->ext_csd.part_config & 0x40) ?
"Boot acknowledge sent during boot operation" :
"No boot acknowledge sent",
partition,
@@ -862,7 +861,7 @@ setup_boot_partitions(struct device *dev, struct device_attribute *attr,
goto err_rtn;
}
- card->ext_csd.boot_config = ext_csd[EXT_CSD_PART_CONFIG];
+ card->ext_csd.part_config = ext_csd[EXT_CSD_PART_CONFIG];
err_rtn:
mmc_release_host(card->host);
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index a6dc049af77b..ca9377680fb1 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -92,7 +92,6 @@ struct mmc_ext_csd {
u8 raw_partition_support; /* 160 */
u8 raw_rpmb_size_mult; /* 168 */
u8 boot_bus_width; /* 177 */
- u8 boot_config; /* 179 */
u8 raw_erased_mem_count; /* 181 */
u8 raw_ext_csd_structure; /* 194 */
u8 raw_card_type; /* 196 */