From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 31 May 2019 15:22:44 +0200 Subject: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions Message-ID: <20190531132244.29719-1-marek.vasut+renesas@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well. Signed-off-by: Marek Vasut Cc: Jean-Jacques Hiblot Cc: Nobuhiro Iwamatsu Cc: Peng Fan --- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 456c1b4cc9..71b52c6cf2 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", -- 2.20.1