mmc: Use EXT_CSD_EXTRACT_BOOT_PART() macro for extracting boot part
Mask macro PART_ACCESS_MASK filter out access bits of emmc register and macro EXT_CSD_EXTRACT_BOOT_PART() extracts boot part bits of emmc register. So use EXT_CSD_EXTRACT_BOOT_PART() when extracting boot partition. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Jaehoon Chung
parent
8af21b094d
commit
8b88206696
@@ -223,8 +223,7 @@ static int mmc_burn_image(size_t image_size)
|
||||
orig_part = mmc->block_dev.hwpart;
|
||||
#endif
|
||||
|
||||
part = (mmc->part_config >> 3) & PART_ACCESS_MASK;
|
||||
|
||||
part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
|
||||
if (part == 7)
|
||||
part = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user