diff options
author | Kouei Abe <kouei.abe.cp@renesas.com> | 2017-05-13 13:51:15 (GMT) |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-06-09 11:25:16 (GMT) |
commit | 3ebc62c987f000f33aa69231e24719547790264a (patch) | |
tree | 51680c19a72a4b5ec1bbac7965bc72ea30412d06 /drivers/mmc | |
parent | 156d64fa55e9914b144c5e83f2a9e13d1223a4d3 (diff) | |
download | u-boot-3ebc62c987f000f33aa69231e24719547790264a.tar.xz |
mmc: sh_sdhi: Set SD_INFOx interrupt mask before command starting
When setting interrupt mask after command starting, an unintended
interrupt status sometimes occurs.
Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/sh_sdhi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c index 25224e2..7f0b4c2 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); |