Message ID | 20230413211057.10975-5-pali@kernel.org |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
Series | mmc: Explain and cleanup partition selection | expand |
On 2023-04-13 14:10, Pali Rohár wrote: > eMMC Boot Partition Enable bits in mmc->part_config (EXT_CSD[179]) has > different coding than eMMC Partition Access bits. > > Use spl_mmc_emmc_boot_partition() function which does this conversion > properly (hopefully). > > Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Angus Ainslie <angus@akkea.ca>
diff --git a/board/purism/librem5/librem5.c b/board/purism/librem5/librem5.c index 386ed1b4fb22..36ecac9d9ed0 100644 --- a/board/purism/librem5/librem5.c +++ b/board/purism/librem5/librem5.c @@ -41,11 +41,7 @@ int board_early_init_f(void) #if IS_ENABLED(CONFIG_LOAD_ENV_FROM_MMC_BOOT_PARTITION) uint board_mmc_get_env_part(struct mmc *mmc) { - uint part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config); - - if (part == 7) - part = 0; - return part; + return spl_mmc_emmc_boot_partition(mmc); } #endif
eMMC Boot Partition Enable bits in mmc->part_config (EXT_CSD[179]) has different coding than eMMC Partition Access bits. Use spl_mmc_emmc_boot_partition() function which does this conversion properly (hopefully). Signed-off-by: Pali Rohár <pali@kernel.org> --- board/purism/librem5/librem5.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)