Skip to contentSkip to conversation

spi: ti_qspi: Full dm conversion

PATCH Superseded Jagan Teki 1 participant 1 message Aug 7, 2018 SPI

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v4 1/1 spi: ti_qspi: Full dm conversion

ti_qspi now support dt along with platform data, respective boards need to switch into dm for the same.

Cc Tom Rini <[email protected]>
Cc Vitaly Andrianov <[email protected]>
Cc Peter Howard <[email protected]>

---
Changes for v2, v3, v4:
- rebased to master

 drivers/spi/Kconfig                    |  12 +-
 drivers/spi/ti_qspi.c                  | 490 +++++++++----------------
 include/dm/platform_data/spi_ti_qspi.h |  19 +
 3 files changed, 202 insertions(+), 319 deletions(-)
 create mode 100644 include/dm/platform_data/spi_ti_qspi.h
drivers/spi/Kconfig +6 -6
index cf64bc97c8..d046e919b4 100644
@@ -215,6 +215,12 @@ config TEGRA210_QSPI
 	  be used to access SPI chips on platforms embedding this
 	  NVIDIA Tegra210 IP core.
 
+config TI_QSPI
+	bool "TI QSPI driver"
+	help
+	  Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms.
+	  This driver support spi flash single, quad and memory reads.
+
 config XILINX_SPI
 	bool "Xilinx SPI driver"
 	help
@@ -293,12 +299,6 @@ config SH_QSPI
 	  Enable the Renesas Quad SPI controller driver. This driver can be
 	  used on Renesas SoCs.
 
-config TI_QSPI
-	bool "TI QSPI driver"
-	help
-	  Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms.
-	  This driver support spi flash single, quad and memory reads.
-
 config KIRKWOOD_SPI
 	bool "Marvell Kirkwood SPI Driver"
 	help
drivers/spi/ti_qspi.c +177 -313

658 lines not on this page · raw message

include/dm/platform_data/spi_ti_qspi.h new file +19 -0
new file mode 100644
index 0000000000..3f5355284e
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2018 Jagan Teki <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __spi_ti_qspi_h
+#define __spi_ti_qspi_h
+
+struct ti_qspi_platdata {
+	struct ti_qspi_regs *base;
+	void *ctrl_mod_mmap;
+	ulong fclk;
+	void *memory_map;
+	uint max_hz;
+	u32 num_cs;
+};
+
+#endif /* __spi_ti_qspi_h */
Signature · 1 line
2.18.0.321.gffc6fa0e3