From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [Patch V4 1/3] mmc: sdhci: use phys2bus macro when dma address is accessed
Date: Fri, 27 Mar 2020 13:08:00 +0900 [thread overview]
Message-ID: <20200327040802.30103-2-jh80.chung@samsung.com> (raw)
In-Reply-To: <20200327040802.30103-1-jh80.chung@samsung.com>
Use phys2bus macro when dma address is accessed.
Some targets need to use pyhs2bus macro. (e.g, RPI4)
After applied it, SDMA mode can be used.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
---
drivers/mmc/sdhci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 520c9f9feb..2b7493fbac 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -16,6 +16,7 @@
#include <sdhci.h>
#include <dm.h>
#include <linux/dma-mapping.h>
+#include <phys2bus.h>
static void sdhci_reset(struct sdhci_host *host, u8 mask)
{
@@ -150,7 +151,8 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
mmc_get_dma_dir(data));
if (host->flags & USE_SDMA) {
- sdhci_writel(host, host->start_addr, SDHCI_DMA_ADDRESS);
+ sdhci_writel(host, phys_to_bus((ulong)host->start_addr),
+ SDHCI_DMA_ADDRESS);
} else if (host->flags & (USE_ADMA | USE_ADMA64)) {
sdhci_prepare_adma_table(host, data);
@@ -204,7 +206,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)
start_addr &=
~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1);
start_addr += SDHCI_DEFAULT_BOUNDARY_SIZE;
- sdhci_writel(host, start_addr,
+ sdhci_writel(host, phys_to_bus((ulong)start_addr),
SDHCI_DMA_ADDRESS);
}
}
--
2.26.0
next prev parent reply other threads:[~2020-03-27 4:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200327040752epcas1p29dd8b762c2f32c65d420d2e0bd796b3a@epcas1p2.samsung.com>
2020-03-27 4:07 ` [Patch V4 0/3] Support SDMA mode on RPI4 target - 32bit Jaehoon Chung
2020-03-27 4:08 ` Jaehoon Chung [this message]
2020-03-27 4:08 ` [Patch V4 2/3] mmc: sdhci: not return error when SDMA is not supported Jaehoon Chung
2020-03-27 4:08 ` [Patch V4 3/3] configs: rpi_4 : enable SDHCI_SDMA config Jaehoon Chung
2020-03-27 13:12 ` Matthias Brugger
2020-03-30 4:19 ` Jaehoon Chung
2020-04-20 7:18 ` Jaehoon Chung
2020-04-29 8:14 ` Marek Szyprowski
2020-05-12 10:11 ` [Patch V4 0/3] Support SDMA mode on RPI4 target - 32bit Matthias Brugger
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=20200327040802.30103-2-jh80.chung@samsung.com \
--to=jh80.chung@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox