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>
This commit is contained in:
Ye.Li
2014-07-21 21:53:50 +08:00
committed by Neena Busireddy
parent d0c4768b5f
commit d8241f3e01
2 changed files with 5 additions and 7 deletions

View File

@ -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);

View File

@ -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 */