All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Date: Mon, 3 Jun 2019 06:34:28 +0000	[thread overview]
Message-ID: <AM0PR04MB44813ADD8648F378EE7578DA88140@AM0PR04MB4481.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190531132244.29719-1-marek.vasut+renesas@gmail.com>


> Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
> 
> 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 <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>
> ---
>  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",

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.20.1

  reply	other threads:[~2019-06-03  6:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 13:22 [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions Marek Vasut
2019-06-03  6:34 ` Peng Fan [this message]
2019-06-04 11:22   ` Faiz Abbas
2019-06-04 13:26     ` Marek Vasut
2019-06-04 13:34       ` Faiz Abbas
2019-06-04 13:38         ` Marek Vasut
2019-06-07  7:53           ` Faiz Abbas
2019-06-07 19:05             ` Marek Vasut
2019-06-10  5:59     ` Peng Fan
2019-06-10 11:33       ` Marek Vasut
2019-06-11  1:17         ` Peng Fan
2019-06-11  3:01           ` Marek Vasut
2019-06-11  8:12           ` Faiz Abbas
2019-06-11 10:04             ` Marek Vasut
2019-06-11 15:59               ` Faiz Abbas
2019-06-14 15:27                 ` Jean-Jacques Hiblot
2019-06-15 15:15                   ` Marek Vasut
2019-06-17  9:09                     ` Jean-Jacques Hiblot
2019-06-17 10:34                       ` Marek Vasut
2019-06-17 14:46                         ` Jean-Jacques Hiblot
2019-06-17 15:47                           ` Marek Vasut
2019-06-18  5:03                             ` Peng Fan
2019-06-18  6:35                               ` Faiz Abbas
2019-06-19  5:42                                 ` Peng Fan
2019-06-18 10:55                               ` Marek Vasut
2019-06-18 14:38                               ` Jean-Jacques Hiblot
2019-06-15 15:12                 ` Marek Vasut
2019-06-11 15:25         ` Jean-Jacques Hiblot
2019-06-11 20:51           ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR04MB44813ADD8648F378EE7578DA88140@AM0PR04MB4481.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.