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/2] mmc: tmio: Limit DMA to 32bit on R-Car Gen3
Date: Tue,  9 Oct 2018 13:23:51 +0200	[thread overview]
Message-ID: <20181009112351.17256-2-marek.vasut+renesas@gmail.com> (raw)
In-Reply-To: <20181009112351.17256-1-marek.vasut+renesas@gmail.com>

The internal DMAC on Gen3 is 32bit only, limit the DMA address
range to 32bit.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
---
 drivers/mmc/tmio-common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 6b21941991..138de59470 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -379,6 +379,12 @@ static bool tmio_sd_addr_is_dmaable(const char *src)
 	if (!IS_ALIGNED(addr, TMIO_SD_DMA_MINALIGN))
 		return false;
 
+#if defined(CONFIG_RCAR_GEN3)
+	/* Gen3 DMA has 32bit limit */
+	if (addr >> 32)
+		return false;
+#endif
+
 #if defined(CONFIG_ARCH_UNIPHIER) && !defined(CONFIG_ARM64) && \
 	defined(CONFIG_SPL_BUILD)
 	/*
-- 
2.18.0

  reply	other threads:[~2018-10-09 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 11:23 [U-Boot] [PATCH 1/2] mmc: tmio: Pass full address to tmio_sd_addr_is_dmaable() Marek Vasut
2018-10-09 11:23 ` Marek Vasut [this message]
2018-10-09 12:24 ` Masahiro Yamada
2018-10-09 14:55   ` Marek Vasut
2018-10-09 15:35     ` Masahiro Yamada
2018-10-09 16:17       ` Marek Vasut
2018-10-10  2:49         ` Masahiro Yamada
  -- strict thread matches above, loose matches on Subject: below --
2018-10-02 22:54 Marek Vasut
2018-10-02 22:54 ` [U-Boot] [PATCH 2/2] mmc: tmio: Limit DMA to 32bit on R-Car Gen3 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=20181009112351.17256-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.