diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2019-05-31 15:22:44 +0200 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2019-06-19 13:53:59 +0800 |
commit | 72119aa14a1c81b5dd2996fc86c80f8d0e2c456d (patch) | |
tree | 2c8fed40c7905e103a1284f471f56f0286f41fa9 /drivers/mmc/mmc.c | |
parent | 77f6e2dd0551d8a825bab391a1bd6b838874bcd4 (diff) |
mmc: Avoid HS400 mode when accessing boot partitions
U-Boot code currently only applies this restriction to HS200 mode,
extend this to HS400 mode as well.
Currently U-Boot code not support accessing boot partition in HS200/400
mode. This needs more check.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 456c1b4cc92..71b52c6cf2c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -905,14 +905,14 @@ static int mmc_set_capacity(struct mmc *mmc, int part_num) return 0; } -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) +#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) static int mmc_boot_part_access_chk(struct mmc *mmc, unsigned int part_num) { int forbidden = 0; bool change = false; if (part_num & PART_ACCESS_MASK) - forbidden = MMC_CAP(MMC_HS_200); + forbidden = MMC_CAP(MMC_HS_200) | MMC_CAP(MMC_HS_400); if (MMC_CAP(mmc->selected_mode) & forbidden) { pr_debug("selected mode (%s) is forbidden for part %d\n", |