summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 45055c46d954..f5b2aaf2371f 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -255,8 +255,8 @@ static int mmc_read_ext_csd(struct mmc_card *card)
/* Cards with density > 2GiB are sector addressed */
if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512) {
unsigned boot_sectors;
- /* size is in 256K chunks, i.e. 512 sectors each */
- boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI] * 512;
+ boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI];
+ boot_sectors *= SZ_256K / 512;
card->ext_csd.sectors -= boot_sectors;
mmc_card_set_blockaddr(card);
}