Skip to contentSkip to conversation

arm: socfpga: Kconfig cleanups

PATCH New Simon Goldschmidt 2 participants 5 messages Feb 13, 2018 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover arm: socfpga: Kconfig cleanups

This patchset moves CONFIG_HW_WATCHDOG from board config files to Kconfig and changes Kconfig items that are not strictly required from 'select' to 'imply'. Defconfigs are not affected.

Lukasz Majewski (1):
Convert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA

Simon Goldschmidt (1):
arm: socfpga: use imply instead of select where applicable

 arch/arm/Kconfig                         | 7 ++++---
 include/configs/socfpga_arria10_socdk.h  | 2 --
 include/configs/socfpga_arria5_socdk.h   | 2 --
 include/configs/socfpga_cyclone5_socdk.h | 2 --
 include/configs/socfpga_de0_nano_soc.h   | 2 --
 include/configs/socfpga_de10_nano.h      | 2 --
 include/configs/socfpga_de1_soc.h        | 2 --
 include/configs/socfpga_is1.h            | 2 --
 include/configs/socfpga_mcvevk.h         | 2 --
 include/configs/socfpga_sockit.h         | 2 --
 include/configs/socfpga_socrates.h       | 2 --
 include/configs/socfpga_sr1500.h         | 2 --
 include/configs/socfpga_vining_fpga.h    | 2 --
 13 files changed, 4 insertions(+), 27 deletions(-)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/2 Convert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA

From: Lukasz Majewski <[email protected]>

All Socfpga boards from ./include/configs/socfpga_* define CONFIG_HW_WATCHDOG.
To ease CONFIG_HW_WATCHDOG conversion to Kconfig select it in config ARCH_SOCFPGA (arch/arm/Kconfig) section.

---

 arch/arm/Kconfig                         | 1 +
 include/configs/socfpga_arria10_socdk.h  | 2 --
 include/configs/socfpga_arria5_socdk.h   | 2 --
 include/configs/socfpga_cyclone5_socdk.h | 2 --
 include/configs/socfpga_de0_nano_soc.h   | 2 --
 include/configs/socfpga_de10_nano.h      | 2 --
 include/configs/socfpga_de1_soc.h        | 2 --
 include/configs/socfpga_is1.h            | 2 --
 include/configs/socfpga_mcvevk.h         | 2 --
 include/configs/socfpga_sockit.h         | 2 --
 include/configs/socfpga_socrates.h       | 2 --
 include/configs/socfpga_sr1500.h         | 2 --
 include/configs/socfpga_vining_fpga.h    | 2 --
 13 files changed, 1 insertion(+), 24 deletions(-)
arch/arm/Kconfig +1 -0
index 225f57e847..b4c79d6499 100644
@@ -702,6 +702,7 @@ config ARCH_SOCFPGA
 	select DM_SPI_FLASH
 	select DM_SPI
 	select ENABLE_ARM_SOC_BOOT0_HOOK
+	select HW_WATCHDOG
 	select ARCH_EARLY_INIT_R
 	select ARCH_MISC_INIT
 	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
include/configs/socfpga_arria10_socdk.h +0 -2
index 83718dd2c9..82bb48b277 100644
@@ -9,8 +9,6 @@
 
 #include <asm/arch/base_addr_a10.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Booting Linux */
 #define CONFIG_LOADADDR		0x01000000
 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
include/configs/socfpga_arria5_socdk.h +0 -2
index 6b6d54b97b..cd5aac65e9 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
 
include/configs/socfpga_cyclone5_socdk.h +0 -2
index 018a0c3bb4..9c5bd648e3 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
 
include/configs/socfpga_de0_nano_soc.h +0 -2
index 275ed7ffeb..e5db00e366 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB */
 
include/configs/socfpga_de10_nano.h +0 -2
index bb50fcf1ff..656af1104d 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB */
 
include/configs/socfpga_de1_soc.h +0 -2
index 05975c9bde..f57b950425 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB */
 
include/configs/socfpga_is1.h +0 -2
index 46f5f135dd..dc318e50dc 100644
@@ -9,8 +9,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x10000000
 
include/configs/socfpga_mcvevk.h +0 -2
index 404f064e94..f13463b8b0 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on MCV */
 
include/configs/socfpga_sockit.h +0 -2
index b4f31c42c5..0bbc7e0105 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
 
include/configs/socfpga_socrates.h +0 -2
index ebb9ac588d..b66108d0cc 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCrates */
 
include/configs/socfpga_sr1500.h +0 -2
index 39bf612291..871f587d45 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SR1500 */
 
include/configs/socfpga_vining_fpga.h +0 -2
index 0c76a77525..1197b40b58 100644
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_HW_WATCHDOG
-
 /* Memory configurations */
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on VINING_FPGA */
 
Signature · 1 line
2.14.1
#2 lore raw

PATCH 2/2 arm: socfpga: use imply instead of select where applicable

In reply to Simon Goldschmidt

Kconfig should only 'select' features that are required for an arch. Standard features that can be disabled without breaking board support should use 'imply' instead, to allow users to disable it.

These options are changed for mach-socfpga:
- DM_SPI & DM_SPI_FLASH: only required with QSPI support enabled
- SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION: the boot rom supports a partitionless mode also, where SPL is located at address 0
- HW_WATCHDOG: while all mainline board defconfigs use it, U-Boot should still work without it.

---

 arch/arm/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/Kconfig +4 -4
index b4c79d6499..5edd67c471 100644
@@ -699,17 +699,17 @@ config ARCH_SOCFPGA
 	select OF_CONTROL
 	select SPL_OF_CONTROL
 	select DM
-	select DM_SPI_FLASH
-	select DM_SPI
 	select ENABLE_ARM_SOC_BOOT0_HOOK
-	select HW_WATCHDOG
 	select ARCH_EARLY_INIT_R
 	select ARCH_MISC_INIT
-	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
 	select SYS_THUMB_BUILD
 	imply CMD_MTDPARTS
 	imply CRC32_VERIFY
+	imply DM_SPI
+	imply DM_SPI_FLASH
 	imply FAT_WRITE
+	imply HW_WATCHDOG
+	imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
 
 config ARCH_SUNXI
 	bool "Support sunxi (Allwinner) SoCs"
Signature · 1 line
2.14.1
#3 lore raw

PATCH 2/2 arm: socfpga: use imply instead of select where applicable

Quoted 33 lines · On Tue, 13 Feb 2018 06:34:14 +0100 Simon Goldschmidt…

Kconfig should only 'select' features that are required for an arch. Standard features that can be disabled without breaking board support should use 'imply' instead, to allow users to disable it.

These options are changed for mach-socfpga:
- DM_SPI & DM_SPI_FLASH: only required with QSPI support enabled
- SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION: the boot rom supports a partitionless mode also, where SPL is located at address 0
- HW_WATCHDOG: while all mainline board defconfigs use it, U-Boot should still work without it.

---

 arch/arm/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/Kconfig +0 -4
index b4c79d6499..5edd67c471 100644
@@ -699,17 +699,17 @@ config ARCH_SOCFPGA
 	select OF_CONTROL
 	select SPL_OF_CONTROL
 	select DM
-	select DM_SPI_FLASH
-	select DM_SPI
 	select ENABLE_ARM_SOC_BOOT0_HOOK
-	select HW_WATCHDOG
 	select ARCH_EARLY_INIT_R
 	select ARCH_MISC_INIT
-	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
 	select SYS_THUMB_BUILD

arch/arm/Kconfig config ARCH_SOCFPGA · line 715

Quoted 10 lines
arch/arm/Kconfig +4 -0
 	imply CMD_MTDPARTS
 	imply CRC32_VERIFY
+	imply DM_SPI
+	imply DM_SPI_FLASH
 	imply FAT_WRITE
+	imply HW_WATCHDOG
+	imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
 
 config ARCH_SUNXI
 	bool "Support sunxi (Allwinner) SoCs"

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180213/daa7a33a/attachment.sig>

#4 lore raw

cover arm: socfpga: Kconfig cleanups

In reply to Simon Goldschmidt

Hi Simon,

Quoted 10 lines

This patchset moves CONFIG_HW_WATCHDOG from board config files to Kconfig and changes Kconfig items that are not strictly required from 'select' to 'imply'. Defconfigs are not affected.

Lukasz Majewski (1):
Convert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA

Simon Goldschmidt (1):
arm: socfpga: use imply instead of select where applicable

Quoted 15 lines
 arch/arm/Kconfig                         | 7 ++++---
 include/configs/socfpga_arria10_socdk.h  | 2 --
 include/configs/socfpga_arria5_socdk.h   | 2 --
 include/configs/socfpga_cyclone5_socdk.h | 2 --
 include/configs/socfpga_de0_nano_soc.h   | 2 --
 include/configs/socfpga_de10_nano.h      | 2 --
 include/configs/socfpga_de1_soc.h        | 2 --
 include/configs/socfpga_is1.h            | 2 --
 include/configs/socfpga_mcvevk.h         | 2 --
 include/configs/socfpga_sockit.h         | 2 --
 include/configs/socfpga_socrates.h       | 2 --
 include/configs/socfpga_sr1500.h         | 2 --
 include/configs/socfpga_vining_fpga.h    | 2 --
 13 files changed, 4 insertions(+), 27 deletions(-)

Thank you for preparing those patches.

I will rebase v3 of WDT move to Kconfig on top of them :-).

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180213/26fa16b7/attachment.sig>