Skip to contentSkip to conversation

arm: ls102xa: Enable Driver Model SPI for ls1021aqds

PATCH New Jagan Teki 2 participants 2 messages Jun 29, 2015

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v8 3/5 arm: ls102xa: Enable Driver Model SPI for ls1021aqds

From: Haikun Wang <[email protected]>

Enable Driver Model SPI for ls1021aqds board. DSPI and QSPI is enabled only when boot from QSPI. DSPI and QSPI are compatible under Driver Model SPI.

---
Changes in v8:
- Fix clerical error

Changes in v7:
- Rebase to master

Changes in v4:
- Add defconfig patch in this series

Changes in v3:
- Remove CONFIG_SPI_FLASH_ATMEL
- IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig, and DM core code use IS_ENABLED(), so configure option in head file can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI

Changes in v2:
- Move all changes inside of CONFIG_QSPI_BOOT

 include/configs/ls1021aqds.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
include/configs/ls1021aqds.h +11 -2
index 5c9d275..46c609a 100644
@@ -407,15 +407,24 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_CMD_FAT
 #define CONFIG_DOS_PARTITION
 
-/* QSPI */
+/* SPI */
 #ifdef CONFIG_QSPI_BOOT
+/* QSPI */
 #define CONFIG_FSL_QSPI
 #define QSPI0_AMBA_BASE			0x40000000
 #define FSL_QSPI_FLASH_SIZE		(1 << 24)
 #define FSL_QSPI_FLASH_NUM		2
+#define CONFIG_SPI_FLASH_SPANSION
 
+/* DSPI */
+#define CONFIG_FSL_DSPI
+
+/* DM SPI */
+#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH_SPANSION
+#define CONFIG_DM_SPI_FLASH
+#define CONFIG_SF_DATAFLASH
+#endif
 #endif
 
 /*
Signature · 1 line
1.9.1
#1 lore raw

PATCH v8 3/5 arm: ls102xa: Enable Driver Model SPI for ls1021aqds

Quoted 52 lines · Jagan Teki

From: Haikun Wang <[email protected]>

Enable Driver Model SPI for ls1021aqds board. DSPI and QSPI is enabled only when boot from QSPI. DSPI and QSPI are compatible under Driver Model SPI.

---
Changes in v8:
- Fix clerical error

Changes in v7:
- Rebase to master

Changes in v4:
- Add defconfig patch in this series

Changes in v3:
- Remove CONFIG_SPI_FLASH_ATMEL
- IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig, and DM core code use IS_ENABLED(), so configure option in head file can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI

Changes in v2:
- Move all changes inside of CONFIG_QSPI_BOOT

  include/configs/ls1021aqds.h | 13 +++++++++++--
  1 file changed, 11 insertions(+), 2 deletions(-)
include/configs/ls1021aqds.h +6 -1
index 5c9d275..46c609a 100644
@@ -407,15 +407,24 @@ unsigned long get_board_ddr_clk(void);
  #define CONFIG_CMD_FAT
  #define CONFIG_DOS_PARTITION
 
-/* QSPI */
+/* SPI */
  #ifdef CONFIG_QSPI_BOOT
+/* QSPI */
  #define CONFIG_FSL_QSPI
  #define QSPI0_AMBA_BASE			0x40000000
  #define FSL_QSPI_FLASH_SIZE		(1 << 24)
  #define FSL_QSPI_FLASH_NUM		2
+#define CONFIG_SPI_FLASH_SPANSION
 
+/* DSPI */
+#define CONFIG_FSL_DSPI
+

include/configs/ls1021aqds.h unsigned long get_board_ddr_clk(void); · line 430

Quoted 10 lines
include/configs/ls1021aqds.h +5 -1
+/* DM SPI */
+#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
  #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH_SPANSION
+#define CONFIG_DM_SPI_FLASH
+#define CONFIG_SF_DATAFLASH
+#endif
  #endif
 
  /*