Skip to contentSkip to conversation

spi: ti_qspi: Full dm conversion

PATCH New Jagan Teki 1 participant 1 message May 7, 2018 SPI

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v3 4/6 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.

---
Changes for 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 46fc6bfdd7..73dd33f716 100644
@@ -212,6 +212,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
@@ -277,12 +283,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.14.3