ramips: fix timing issues when using MT7621 spi
authorJohn Crispin <john@openwrt.org>
Mon, 11 Jul 2016 12:30:59 +0000 (12:30 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 11 Jul 2016 12:30:59 +0000 (12:30 +0000)
Signed-off-by: John Crispin <john@phrozen.org>
SVN-Revision: 49399

target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch

index b00d36bdd9204e64596a2ce56df9ca77f9abb429..4fe9f4c89e75c49f163009c00e85546305ab6031 100644 (file)
@@ -25,7 +25,7 @@
  obj-$(CONFIG_SPI_OC_TINY)             += spi-oc-tiny.o
 --- /dev/null
 +++ b/drivers/spi/spi-mt7621.c
-@@ -0,0 +1,391 @@
+@@ -0,0 +1,394 @@
 +/*
 + * spi-mt7621.c -- MediaTek MT7621 SPI controller driver
 + *
 +              if (!buf)
 +                      continue;
 +
++              if (t->speed_hz < speed)
++                      speed = t->speed_hz;
++
 +              if (WARN_ON(len + rlen > 36)) {
 +                      status = -EIO;
 +                      goto msg_done;