summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJulien Panis <jpanis@baylibre.com>2023-05-29 16:18:16 +0200
committerPraneeth Bajjuri <praneeth@ti.com>2023-06-29 09:42:27 -0500
commit9ed6d8935d9aaca9507cbcc820833a2a238ac980 (patch)
treec3abbcd63857e901d9dcab293c8e4439d049a1f7 /include
parent9cb70fef623bb403185bb93859e83476f66d7308 (diff)
drivers: spi: omap3_spi: Initialize mode for all channels
At first SPI transfers, multiple chip selects can be enabled simultaneously. This is due to chip select polarity, which is not properly initialized for all channels. This patch fixes the issue. Signed-off-by: Julien Panis <jpanis@baylibre.com>
Diffstat (limited to 'include')
-rw-r--r--include/omap3_spi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/omap3_spi.h b/include/omap3_spi.h
index cae3770583..5381431d43 100644
--- a/include/omap3_spi.h
+++ b/include/omap3_spi.h
@@ -46,6 +46,8 @@
#define OMAP4_MCSPI_REG_OFFSET 0x100
+#define OMAP4_MCSPI_CHAN_NB 4
+
/* OMAP3 McSPI registers */
struct mcspi_channel {
unsigned int chconf; /* 0x2C, 0x40, 0x54, 0x68 */
@@ -64,7 +66,7 @@ struct mcspi {
unsigned int wakeupenable; /* 0x20 */
unsigned int syst; /* 0x24 */
unsigned int modulctrl; /* 0x28 */
- struct mcspi_channel channel[4];
+ struct mcspi_channel channel[OMAP4_MCSPI_CHAN_NB];
/* channel0: 0x2C - 0x3C, bus 0 & 1 & 2 & 3 */
/* channel1: 0x40 - 0x50, bus 0 & 1 */
/* channel2: 0x54 - 0x64, bus 0 & 1 */