blob: 810c72e1909f54a88e33f58e246cfab8586da255 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
https://bugs.alpinelinux.org/issues/4973
https://github.com/raspberrypi/linux/issues/911
https://github.com/raspberrypi/linux/pull/1135
https://github.com/msperl/linux-rpi/commit/aef50a19f335ae3d2eb43ac5496c7f03930b394f
This is not a proper fix, but as this is rasperry pi specific kernel,
we've applied this workaround for now.
From aef50a19f335ae3d2eb43ac5496c7f03930b394f Mon Sep 17 00:00:00 2001
From: Martin Sperl <kernel@martin.sperl.org>
Date: Tue, 15 Sep 2015 07:26:07 +0000
Subject: [PATCH] mmc: spi: disable dma mapping code, as it does not work
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>
---
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 ae19d83..16946e2 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);
|