aboutsummaryrefslogtreecommitdiff
path: root/board/purism/librem5/librem5.c
diff options
context:
space:
mode:
authorPali Rohár2023-03-11 11:44:27 +0100
committerJaehoon Chung2023-04-10 12:18:17 +0900
commit8b8820669646ceb08d6ceed4181b53042639f3ab (patch)
treee637be01de1e169550355e70f79193f948f865c4 /board/purism/librem5/librem5.c
parent8af21b094d92f671bd2f6483a15be5b3c33baca6 (diff)
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>
Diffstat (limited to 'board/purism/librem5/librem5.c')
-rw-r--r--board/purism/librem5/librem5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/purism/librem5/librem5.c b/board/purism/librem5/librem5.c
index caa02655fc4..386ed1b4fb2 100644
--- a/board/purism/librem5/librem5.c
+++ b/board/purism/librem5/librem5.c
@@ -41,7 +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 = (mmc->part_config >> 3) & PART_ACCESS_MASK;
+ uint part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
if (part == 7)
part = 0;