All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] mmc: sh_sdhi: Set SD_INFOx interrupt mask before command starting
Date: Sat, 13 May 2017 15:51:15 +0200	[thread overview]
Message-ID: <20170513135118.8134-2-marek.vasut+renesas@gmail.com> (raw)
In-Reply-To: <20170513135118.8134-1-marek.vasut+renesas@gmail.com>

From: Kouei Abe <kouei.abe.cp@renesas.com>

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>
---
 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

  reply	other threads:[~2017-05-13 13:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170513135203epcas1p43a7388f762a571764fcfd1035be44dd2@epcas1p4.samsung.com>
2017-05-13 13:51 ` [U-Boot] [PATCH 1/5] mmc: sh_sdhi: Fix Kconfig entry Marek Vasut
2017-05-13 13:51   ` Marek Vasut [this message]
2017-05-13 21:45     ` [U-Boot] [PATCH 2/5] mmc: sh_sdhi: Set SD_INFOx interrupt mask before command starting Nobuhiro Iwamatsu
2017-05-25 13:40     ` Jaehoon Chung
2017-05-13 13:51   ` [U-Boot] [PATCH 3/5] mmc: sh_sdhi: Add 64-bit access to sd_buf support Marek Vasut
2017-05-13 21:46     ` Nobuhiro Iwamatsu
2017-05-25 13:43     ` Jaehoon Chung
     [not found]     ` <CGME20170601035058epcas1p16abeaa2e834d0e91d8626dce69646492@epcas1p1.samsung.com>
2017-06-01  3:50       ` [U-Boot] [U-Boot, " Jaehoon Chung
2017-05-13 13:51   ` [U-Boot] [PATCH 4/5] mmc: sh_sdhi: Add MMC version 5.0 support Marek Vasut
2017-05-13 21:49     ` Nobuhiro Iwamatsu
2017-05-25 13:45     ` Jaehoon Chung
2017-05-13 13:51   ` [U-Boot] [PATCH 5/5] mmc: sh_sdhi: Add SDHI support Marek Vasut
2017-05-13 21:49     ` Nobuhiro Iwamatsu
2017-05-25 13:45     ` Jaehoon Chung
2017-05-13 21:44   ` [U-Boot] [PATCH 1/5] mmc: sh_sdhi: Fix Kconfig entry Nobuhiro Iwamatsu
2017-05-25 13:39   ` Jaehoon Chung
2017-05-30 22:59     ` Nobuhiro Iwamatsu
2017-05-31  2:06       ` Jaehoon Chung
2017-05-31  5:07         ` Nobuhiro Iwamatsu
2017-06-05 11:57           ` Marek Vasut
2017-06-05 13:11             ` Jaehoon Chung
2017-06-05 13:32               ` Marek Vasut
2017-06-07  3:29                 ` Jaehoon Chung
2017-06-07  6:45                   ` 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=20170513135118.8134-2-marek.vasut+renesas@gmail.com \
    --to=marek.vasut@gmail.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.