summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-07-21 21:53:50 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:17:07 -0600
commit99a926c6c1c3b745cbc2bcc90ad737ce6422797c (patch)
treebdbe0fbf72f7c3a8e147ac6fbc259b12203fbea0 /drivers/mmc
parent0b52f2d7aef2f85247d881372d923c3341e259a5 (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 e66d21ade29855299ce048c97830a4bb79373761)
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/mmc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index a199c9f2b641..42d74d730b68 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -318,7 +318,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];
@@ -706,7 +705,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;
@@ -740,9 +739,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,
@@ -901,7 +900,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);