drivers/mmc/core/mmc.c:228: error: ‘SZ_256K’ undeclared (first use in this function)
Introduced by:
mmc: subtract boot sectors from disk size for eMMC 4.3+ devices
(SZ_* doesn't exist on anything but arm)
Change-Id: I981217adea4ef56bf870562b6711488f3f4bf830
Signed-off-by: Olof Johansson <olof@lixom.net>
/* Cards with density > 2GiB are sector addressed */
if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512) {
unsigned boot_sectors;
- boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI];
- boot_sectors *= SZ_256K / 512;
+ /* size is in 256K chunks, i.e. 512 sectors each */
+ boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI] * 512;
card->ext_csd.sectors -= boot_sectors;
mmc_card_set_blockaddr(card);
}