[U-Boot] [PATCH 2/5] mmc: sh_sdhi: Set SD_INFOx interrupt mask before command starting
Nobuhiro Iwamatsu
iwamatsu at nigauri.org
Sat May 13 21:45:55 UTC 2017
Hi,
2017-05-13 22:51 GMT+09:00 Marek Vasut <marek.vasut at gmail.com>:
> From: Kouei Abe <kouei.abe.cp at renesas.com>
>
> When setting interrupt mask after command starting, an unintended
> interrupt status sometimes occurs.
>
> Signed-off-by: Kouei Abe <kouei.abe.cp at renesas.com>
> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx at renesas.com>
> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx at renesas.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> ---
> drivers/mmc/sh_sdhi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
> index 25224e2e1d..7f0b4c2603 100644
> --- a/drivers/mmc/sh_sdhi.c
> +++ b/drivers/mmc/sh_sdhi.c
> @@ -546,8 +546,6 @@ static int sh_sdhi_start_cmd(struct sh_sdhi_host *host,
> break;
> }
>
> - sh_sdhi_writew(host, SDHI_CMD, (unsigned short)(opc & CMD_MASK));
> -
> host->wait_int = 0;
> sh_sdhi_writew(host, SDHI_INFO1_MASK,
> ~INFO1M_RESP_END & sh_sdhi_readw(host, SDHI_INFO1_MASK));
> @@ -557,6 +555,8 @@ static int sh_sdhi_start_cmd(struct sh_sdhi_host *host,
> INFO2M_RESP_TIMEOUT | INFO2M_ILA) &
> sh_sdhi_readw(host, SDHI_INFO2_MASK));
>
> + sh_sdhi_writew(host, SDHI_CMD, (unsigned short)(opc & CMD_MASK));
> +
> time = sh_sdhi_wait_interrupt_flag(host);
> if (!time)
> return sh_sdhi_error_manage(host);
> --
> 2.11.0
>
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
More information about the U-Boot
mailing list