Skip to contentSkip to conversation

spi: Moved spi u-bbot headers to Kconfig

PATCH New Vipul Kumar 3 participants 5 messages Feb 28, 2018 – Mar 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover spi: Moved spi u-bbot headers to Kconfig

This seris of patch moved spi headers to Kconfig.
These are the configs:
-CONFIG_SYS_ZYNQ_SPI_WAIT
-CONFIG_XILINX_SPI_IDLE_VAL
-CONFIG_SYS_ZYNQ_QSPI_WAIT

-Changes in V2:
- Added depends on ZYNQ_QSPI
- Added depends on XILINX_SPI
- Branch: u-boot-microblaze/kconfig

Vipul Kumar (2):
qspi: Added Kconfig support for CONFIG_SYS_ZYNQ_QSPI_WAIT
spi: Added Kconfig support for SYS_ZYNQ_SPI_WAIT and
XILINX_SPI_IDLE_VAL

 drivers/spi/Kconfig      | 21 +++++++++++++++++++++
 drivers/spi/xilinx_spi.c |  4 ----
 drivers/spi/zynq_qspi.c  |  3 ---
 drivers/spi/zynq_spi.c   |  3 ---
 4 files changed, 21 insertions(+), 10 deletions(-)

--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

#1 lore raw

PATCH v2 1/2 qspi: Added Kconfig support for CONFIG_SYS_ZYNQ_QSPI_WAIT

This patch added Kconfig support for CONFIG_SYS_ZYNQ_QSPI_WAIT and set it to default value 10 milliseconds.

---
-Changes in v2:
- Added depends on ZYNQ_QSPI
- Branch: u-boot-microblaze/kconfig

---
 drivers/spi/Kconfig     | 7 +++++++
 drivers/spi/zynq_qspi.c | 3 ---
 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/spi/Kconfig +7 -0
index 235a8c7..94f6d7d 100644
@@ -204,6 +204,13 @@ config ZYNQ_QSPI
          Zynq QSPI IP core. This IP is used to connect the flash in
          4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel.
 
+config SYS_ZYNQ_QSPI_WAIT
+       int "Define Zynq QSPI wait time in ms"
+       depends on ZYNQ_QSPI
+       default 10
+       help
+         Define default Zynq QSPI wait time in milliseconds.
+
 endif # if DM_SPI
 
 config SOFT_SPI
drivers/spi/zynq_qspi.c +0 -3
index 255e02f..c9241aa 100644
@@ -46,9 +46,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ZYNQ_QSPI_CR_SS_SHIFT          10      /* Slave select shift */
 
 #define ZYNQ_QSPI_FIFO_DEPTH           63
-#ifndef CONFIG_SYS_ZYNQ_QSPI_WAIT
-#define CONFIG_SYS_ZYNQ_QSPI_WAIT      CONFIG_SYS_HZ/100       /* 10 ms */
-#endif
 
 /* zynq qspi register set */
 struct zynq_qspi_regs {

--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

#2 lore raw

PATCH v2 2/2 spi: Added Kconfig support for SYS_ZYNQ_SPI_WAIT and XILINX_SPI_IDLE_VAL

In reply to Vipul Kumar

This patch added Kconfig support for CONFIG_SYS_ZYNQ_SPI_WAIT and CONFIG_XILINX_SPI_IDLE_VAL and set default value.

---
- Changes in V2:
- Added depends on XILINX_SPI
- Branch: u-boot-microblaze/kconfig

---
 drivers/spi/Kconfig      | 14 ++++++++++++++
 drivers/spi/xilinx_spi.c |  4 ----
 drivers/spi/zynq_spi.c   |  3 ---
 3 files changed, 14 insertions(+), 7 deletions(-)
drivers/spi/Kconfig +14 -0
index 94f6d7d..d8e17cd 100644
@@ -211,6 +211,20 @@ config SYS_ZYNQ_QSPI_WAIT
        help
          Define default Zynq QSPI wait time in milliseconds.
 
+config SYS_ZYNQ_SPI_WAIT
+       int "Define Zynq SPI wait time in ms"
+       depends on XILINX_SPI
+       default 10
+       help
+         Define default Zynq SPI wait time in milliseconds.
+
+config XILINX_SPI_IDLE_VAL
+       hex "Define the default SPI idle value"
+       depends on XILINX_SPI
+       default 0xFFFFFFFF
+       help
+         Set the default SPI idle value.
+
 endif # if DM_SPI
 
 config SOFT_SPI
drivers/spi/xilinx_spi.c +0 -4
index a951a77..9781ea9 100644
@@ -74,10 +74,6 @@
                                SPICR_SPE)
 #define XILSPI_SPICR_DFLT_OFF  (SPICR_MASTER_INHIBIT | SPICR_MANUAL_SS)
 
-#ifndef CONFIG_XILINX_SPI_IDLE_VAL
-#define CONFIG_XILINX_SPI_IDLE_VAL     GENMASK(7, 0)
-#endif
-
 #ifndef CONFIG_SYS_XILINX_SPI_LIST
 #define CONFIG_SYS_XILINX_SPI_LIST     { CONFIG_SYS_SPI_BASE }
 #endif
drivers/spi/zynq_spi.c +0 -3
index ed2b8cb..be8f525 100644
@@ -33,9 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ZYNQ_SPI_CR_SS_SHIFT           10      /* Slave select shift */
 
 #define ZYNQ_SPI_FIFO_DEPTH            128
-#ifndef CONFIG_SYS_ZYNQ_SPI_WAIT
-#define CONFIG_SYS_ZYNQ_SPI_WAIT       (CONFIG_SYS_HZ/100)     /* 10 ms */
-#endif
 
 /* zynq spi register set */
 struct zynq_spi_regs {

--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

#3 lore raw

v2 cover spi: Moved spi u-bbot headers to Kconfig

In reply to Vipul Kumar

Review

Quoted 5 lines · Vipul Kumar

This seris of patch moved spi headers to Kconfig.
These are the configs:

(quoted diff) +0 -3
-CONFIG_SYS_ZYNQ_SPI_WAIT
-CONFIG_XILINX_SPI_IDLE_VAL
-CONFIG_SYS_ZYNQ_QSPI_WAIT

This make unnecessary of adding Kconfig options for local defined macros, Better keep this as it is or try with ant dt property,

#4 lore raw

v2 cover spi: Moved spi u-bbot headers to Kconfig

Quoted 9 lines · Jagan Teki

Review

Quoted 5 lines · Vipul Kumar

This seris of patch moved spi headers to Kconfig.
These are the configs:

(quoted diff) +0 -3
-CONFIG_SYS_ZYNQ_SPI_WAIT
-CONFIG_XILINX_SPI_IDLE_VAL
-CONFIG_SYS_ZYNQ_QSPI_WAIT

This make unnecessary of adding Kconfig options for local defined macros, Better keep this as it is or try with ant dt property,

If there is not configuration in board header file that I also think that there is no reason to move them to Kconfig.

Just remove that CONFIG_ prefix and they can be removed from whitelist.

Thanks,
Michal