aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch
diff options
context:
space:
mode:
authorIan Pozella <Ian.Pozella@imgtec.com>2017-02-15 09:05:24 +0000
committerFelix Fietkau <nbd@nbd.name>2017-03-22 11:43:22 +0100
commit52c17bff3c861dc28517303e535b880473a54498 (patch)
treeed706b19a6a8f37598f73bba9c5eefb567719482 /target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch
parent370d740647707f9caec915b5c1f5cb1a278b1d3b (diff)
downloadupstream-52c17bff3c861dc28517303e535b880473a54498.tar.gz
upstream-52c17bff3c861dc28517303e535b880473a54498.tar.bz2
upstream-52c17bff3c861dc28517303e535b880473a54498.zip
pistachio: add 4.9 kernel support
This adds kernel support for the Pistachio SoC and the Marduk (Ci40) board which uses it. Much of the code for Pistachio has been upstreamed however some patches are still required to boot from the Marduk board: * spi bug fixes * dma bug fixes * pistachio internal clock tree bug fixes * spi-nand implementation * dts based mtd device naming scheme * dts backports and bug fixes Signed-off-by: Abhijit Mahajani <Abhijit.Mahajani@imgtec.com> Signed-off-by: Francois Berder <francois.berder@imgtec.com> Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
Diffstat (limited to 'target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch')
-rw-r--r--target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch b/target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch
new file mode 100644
index 0000000000..d5bf309b4e
--- /dev/null
+++ b/target/linux/pistachio/patches-4.9/103-spi-img-spfi-set-device-select-bits-for-SPFI-port-st.patch
@@ -0,0 +1,32 @@
+From 145f5369510b86cd55c659388a26a0cc267f8874 Mon Sep 17 00:00:00 2001
+From: Ionela Voinescu <ionela.voinescu@imgtec.com>
+Date: Mon, 1 Feb 2016 10:58:08 +0000
+Subject: spi: img-spfi: set device select bits for SPFI port state
+
+Even if the chip select line is not controlled by the SPFI
+hardware, the device select bits need to be set to specify
+the chip select line in use for the hardware to know what
+parameters to use for the current transfer.
+
+Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
+---
+ drivers/spi/spi-img-spfi.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c
+index c845a50..0d73d31 100644
+--- a/drivers/spi/spi-img-spfi.c
++++ b/drivers/spi/spi-img-spfi.c
+@@ -438,6 +438,9 @@ static int img_spfi_prepare(struct spi_master *master, struct spi_message *msg)
+ u32 val;
+
+ val = spfi_readl(spfi, SPFI_PORT_STATE);
++ val &= ~(SPFI_PORT_STATE_DEV_SEL_MASK <<
++ SPFI_PORT_STATE_DEV_SEL_SHIFT);
++ val |= msg->spi->chip_select << SPFI_PORT_STATE_DEV_SEL_SHIFT;
+ if (msg->spi->mode & SPI_CPHA)
+ val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
+ else
+--
+2.7.4
+