aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-02-17 01:29:44 +0100
committerDavid Bauer <mail@david-bauer.net>2021-02-20 01:26:33 +0100
commitd6b785d47739a84611088ab26256fa5808d06a9d (patch)
treed45ffa6e6182ce80ec35663de8c514888655e1b8 /target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch
parentfb64e2c30f0cba887d3b183ce52de36b3e8bbb7e (diff)
downloadupstream-d6b785d47739a84611088ab26256fa5808d06a9d.tar.gz
upstream-d6b785d47739a84611088ab26256fa5808d06a9d.tar.bz2
upstream-d6b785d47739a84611088ab26256fa5808d06a9d.zip
ath79: add kernel 5.10 support
This adds Kernel 5.10 support for the generic, nand and tiny subtargets. The following patch is not contained, as it needs to be reworked: platform/920-mikrotik-rb4xx.patch Tested-on: - Siemens WS-AP3610 - Enterasys WS-AP3710 - Aerohive HiveAP 121 - TP-Link TL-WA901 v2 - TP-Link TL-WR741 v1 Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch')
-rw-r--r--target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch b/target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch
new file mode 100644
index 0000000000..1e461cee0a
--- /dev/null
+++ b/target/linux/ath79/patches-5.10/0054-spi-always-write-cs.patch
@@ -0,0 +1,31 @@
+Upstream commit d40f0b6f2e21 ("spi: Avoid settingthe chip select if
+we don't need to") causes the SPI CS only to be asserted once and not
+if it's state stays the same.
+
+This seems to cause problems with the SPI on the AR724x and the AR913x
+(but not the AR71xx). AR934x and subsequent chips do not look affected.
+
+ToDo:
+ - Analyze if this is a hardware bug or a bug in the software.
+ - Send a cleaned up patch upstream.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -791,6 +791,7 @@ static void spi_set_cs(struct spi_device
+ {
+ bool enable1 = enable;
+
++#if 0
+ /*
+ * Avoid calling into the driver (or doing delays) if the chip select
+ * isn't actually changing from the last time this was called.
+@@ -801,6 +802,7 @@ static void spi_set_cs(struct spi_device
+
+ spi->controller->last_cs_enable = enable;
+ spi->controller->last_cs_mode_high = spi->mode & SPI_CS_HIGH;
++#endif
+
+ if (!spi->controller->set_cs_timing) {
+ if (enable1)