diff options
author | John Crispin <blogic@openwrt.org> | 2015-10-02 10:52:24 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-10-02 10:52:24 +0000 |
commit | cbd617050a5a9f7d76f734fda704bdd8087c6a6e (patch) | |
tree | c4b5cf5d074df8adf0e9046230dcd4ced85cbd77 | |
parent | 32171a0c097ebc90c72f45771ee9662534c1c3fb (diff) | |
download | upstream-cbd617050a5a9f7d76f734fda704bdd8087c6a6e.tar.gz upstream-cbd617050a5a9f7d76f734fda704bdd8087c6a6e.tar.bz2 upstream-cbd617050a5a9f7d76f734fda704bdd8087c6a6e.zip |
ralink: speed selection was broken in spi-mt7621
Signed-off-by: John Crispin <blogic@openwrt.org>
Backport of r47073
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47097 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch b/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch index 2ba1ee8776..589c67e707 100644 --- a/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch +++ b/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch @@ -25,7 +25,7 @@ obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o --- /dev/null +++ b/drivers/spi/spi-mt7621.c -@@ -0,0 +1,479 @@ +@@ -0,0 +1,480 @@ +/* + * spi-mt7621.c -- MediaTek MT7621 SPI controller driver + * @@ -117,12 +117,12 @@ +{ + u32 master = mt7621_spi_read(rs, MT7621_SPI_MASTER); + -+ master &= ~(0xfff << 16); -+ master |= 1 << 16; + master |= 7 << 29; + master |= 1 << 2; + if (duplex) + master |= 1 << 10; ++ else ++ master &= ~(1 << 10); + + mt7621_spi_write(rs, MT7621_SPI_MASTER, master); +} @@ -322,6 +322,8 @@ + + for (i = 0; i < t->len; i++, len++) + data[len / 4] |= buf[i] << (8 * (len & 3)); ++ if (speed > t->speed_hz) ++ speed = t->speed_hz; + } + + if (WARN_ON(rx_len > 16)) { @@ -354,7 +356,6 @@ + for (i = 0; i < rx_len; i += 4) + data[i / 4] = mt7621_spi_read(rs, MT7621_SPI_DATA4 + i); + -+ //m->actual_length = len + rx_len; + m->actual_length = rx_len; + + len = 0; |