[PATCH] mmc: spi: disable dma mapping code, as it does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



since:
	commit 0589342c27944e50ebd7a54f5215002b6598b748
	Author: Rob Herring <rob.herring@xxxxxxxxxxx>
	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@xxxxxxxxxxxxxxxx>
Submitted-by: Phil Elwell <phil@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxx>
+	 * 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux