From: Phil Elwell <phil@raspberrypi.org>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Martin Sperl <kernel@martin.sperl.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mmc: spi: disable dma mapping code, as it does not work
Date: Mon, 22 May 2017 10:09:23 +0100 [thread overview]
Message-ID: <c73b9ba9-1699-2aff-e2fd-b4b4f292a3ca@raspberrypi.org> (raw)
since:
commit 0589342c27944e50ebd7a54f5215002b6598b748
Author: Rob Herring <rob.herring@calxeda.com>
Date: Tue Oct 29 23:36:46 2013 -0500
of: set dma_mask to point to coherent_dma_mask
Platform devices created by DT code don't initialize dma_mask pointer to
anything. Set it to coherent_dma_mask by default if the architecture
code has not set it.
the mmc-spi driver no longer detects the sd-cards any longer.
This patch disables the offending section in mmc_spi
so that the driver works again and detects the sd card normally.
There is no real negative impact as the spi-framework
does no longer rely on driver-provided DMA mappings but
maps the transfers transparently.
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Submitted-by: Phil Elwell <phil@raspberrypi.org>
---
drivers/mmc/host/mmc_spi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index ae19d83bb9de0..16946e2513afa 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1387,6 +1387,16 @@ static int mmc_spi_probe(struct spi_device *spi)
if (!host->data)
goto fail_nobuf1;
+ /* for some reason mmc_spi does not work with this enabled
+ * it is not needed anyway, as the SPI framework does DMA
+ * transfers now automatically
+ * the patch that introduced this was:
+ * commit 0589342c27944e50ebd7a54f5215002b6598b748
+ * Author: Rob Herring <rob.herring@calxeda.com>
+ * Date: Tue Oct 29 23:36:46 2013 -0500
+ * of: set dma_mask to point to coherent_dma_mask
+ */
+#if 0
if (spi->master->dev.parent->dma_mask) {
struct device *dev = spi->master->dev.parent;
@@ -1402,6 +1412,7 @@ static int mmc_spi_probe(struct spi_device *spi)
host->data_dma, sizeof(*host->data),
DMA_BIDIRECTIONAL);
}
+#endif
/* setup message for status/busy readback */
spi_message_init(&host->readback);
next reply other threads:[~2017-05-22 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 9:09 Phil Elwell [this message]
2017-05-23 7:58 ` [PATCH] mmc: spi: disable dma mapping code, as it does not work Ulf Hansson
2017-05-23 10:11 ` Phil Elwell
2017-05-23 10:23 ` Ulf Hansson
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=c73b9ba9-1699-2aff-e2fd-b4b4f292a3ca@raspberrypi.org \
--to=phil@raspberrypi.org \
--cc=hkallweit1@gmail.com \
--cc=kernel@martin.sperl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).