Skip to contentSkip to conversation

arm: lpc32xx: create platform specific Kconfig file

PATCH New Vladimir Zapolskiy 2 participants 6 messages Sep 17, 2018 – Oct 20, 2018

Subsystems (3)
lore
Share & tools
lore

Vladimir Zapolskiy

author maintainer
#0 lore raw

cover arm: lpc32xx: create platform specific Kconfig file

There is a need to introduce ARCH_LPC32XX build config symbol to improve selection of build options for drivers, which are specific to NXP LPC32xx platform only. At the same time the new Kconfig file and sections can be used to describe common SoC properties and collect entries of all LPC32xx boards.

The presented two patches are the initial ones in the series of LPC32xx device driver changes, which move LPC32xx board specific options from include/configs/* to build system and board configs.

Vladimir Zapolskiy (2):
arm: lpc32xx: add CONFIG_ARCH_LPC32XX build option
Makefile: add LPC32xx precondition for building platform images

 Makefile                                |  2 ++
 arch/arm/Kconfig                        | 24 ++++++++++++------------
 arch/arm/cpu/arm926ejs/lpc32xx/Kconfig  | 20 ++++++++++++++++++++
 board/timll/devkit3250/Kconfig          |  3 ---
 board/work-microwave/work_92105/Kconfig |  3 ---
 configs/devkit3250_defconfig            |  6 +-----
 configs/work_92105_defconfig            | 11 ++++-------
 7 files changed, 39 insertions(+), 30 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/Kconfig
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 1/2 arm: lpc32xx: add CONFIG_ARCH_LPC32XX build option

The explicit arch specific build symbol allows to group supported boards, generalize common config options and it will serve as a dependency for platform only drivers.

Two related board defconfigs are resynced after the change.

---
 arch/arm/Kconfig                        | 24 ++++++++++++------------
 arch/arm/cpu/arm926ejs/lpc32xx/Kconfig  | 20 ++++++++++++++++++++
 board/timll/devkit3250/Kconfig          |  3 ---
 board/work-microwave/work_92105/Kconfig |  3 ---
 configs/devkit3250_defconfig            |  6 +-----
 configs/work_92105_defconfig            | 11 ++++-------
 6 files changed, 37 insertions(+), 30 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/Kconfig
arch/arm/Kconfig +12 -12
index 0f8dd32bdd0e..921e6ea72326 100644
@@ -443,16 +443,6 @@ config ARCH_MVEBU
 	select SPI
 	imply CMD_DM
 
-config TARGET_DEVKIT3250
-	bool "Support devkit3250"
-	select CPU_ARM926EJS
-	select SUPPORT_SPL
-
-config TARGET_WORK_92105
-	bool "Support work_92105"
-	select CPU_ARM926EJS
-	select SUPPORT_SPL
-
 config TARGET_APF27
 	bool "Support apf27"
 	select CPU_ARM926EJS
@@ -668,6 +658,16 @@ config ARCH_MESON
 	  targeted at media players and tablet computers. We currently
 	  support the S905 (GXBaby) 64-bit SoC.
 
+config ARCH_LPC32XX
+	bool "NXP LPC32xx platform"
+	select CPU_ARM926EJS
+	select DM
+	select DM_GPIO
+	select DM_SERIAL
+	select SPL_DM if SPL
+	select SUPPORT_SPL
+	imply CMD_DM
+
 config ARCH_MX8M
 	bool "NXP i.MX8M platform"
 	select ARM64
@@ -1389,6 +1389,8 @@ source "arch/arm/mach-keystone/Kconfig"
 
 source "arch/arm/mach-kirkwood/Kconfig"
 
+source "arch/arm/cpu/arm926ejs/lpc32xx/Kconfig"
+
 source "arch/arm/mach-mvebu/Kconfig"
 
 source "arch/arm/cpu/armv7/ls102xa/Kconfig"
@@ -1505,11 +1507,9 @@ source "board/st/stv0991/Kconfig"
 source "board/tcl/sl50/Kconfig"
 source "board/ucRobotics/bubblegum_96/Kconfig"
 source "board/birdland/bav335x/Kconfig"
-source "board/timll/devkit3250/Kconfig"
 source "board/toradex/colibri_pxa270/Kconfig"
 source "board/vscom/baltos/Kconfig"
 source "board/woodburn/Kconfig"
-source "board/work-microwave/work_92105/Kconfig"
 source "board/xilinx/Kconfig"
 source "board/xilinx/zynq/Kconfig"
 source "board/xilinx/zynqmp/Kconfig"
arch/arm/cpu/arm926ejs/lpc32xx/Kconfig new file +20 -0
new file mode 100644
index 000000000000..986ad738ac14
@@ -0,0 +1,20 @@
+if ARCH_LPC32XX
+
+config SYS_SOC
+	default "lpc32xx"
+
+choice
+	prompt "NXP LPC32xx board select"
+
+config TARGET_DEVKIT3250
+	bool "Timll DevKit3250"
+
+config TARGET_WORK_92105
+	bool "Work Microwave Work_92105"
+
+endchoice
+
+source "board/timll/devkit3250/Kconfig"
+source "board/work-microwave/work_92105/Kconfig"
+
+endif
board/timll/devkit3250/Kconfig +0 -3
index e3bd4569d6e1..5129c2dcae54 100644
@@ -6,9 +6,6 @@ config SYS_BOARD
 config SYS_VENDOR
 	default "timll"
 
-config SYS_SOC
-	default "lpc32xx"
-
 config SYS_CONFIG_NAME
 	default "devkit3250"
 
board/work-microwave/work_92105/Kconfig +0 -3
index 4bc34ed01f0c..32632f5ab529 100644
@@ -6,9 +6,6 @@ config SYS_BOARD
 config SYS_VENDOR
 	default "work-microwave"
 
-config SYS_SOC
-	default "lpc32xx"
-
 config SYS_CONFIG_NAME
 	default "work_92105"
 
configs/devkit3250_defconfig +1 -5
index cdb4bd50d736..f0a7997db1dc 100644
@@ -1,5 +1,5 @@
 CONFIG_ARM=y
-CONFIG_TARGET_DEVKIT3250=y
+CONFIG_ARCH_LPC32XX=y
 CONFIG_SYS_TEXT_BASE=0x83F00000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
@@ -29,9 +29,6 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_JFFS2=y
 CONFIG_ENV_IS_IN_NAND=y
-CONFIG_DM=y
-CONFIG_SPL_DM=y
-CONFIG_DM_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_NAND=y
@@ -40,7 +37,6 @@ CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=31
-CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_LPC32XX_SSP=y
configs/work_92105_defconfig +4 -7
index 7504077558b6..105e51a40012 100644
@@ -1,12 +1,13 @@
 CONFIG_ARM=y
-CONFIG_TARGET_WORK_92105=y
+CONFIG_ARCH_LPC32XX=y
 CONFIG_SYS_TEXT_BASE=0x80100000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL=y
+CONFIG_TARGET_WORK_92105=y
 CONFIG_CMD_HD44760=y
 CONFIG_CMD_MAX6957=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL=y
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
@@ -32,13 +33,9 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_DATE=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
-CONFIG_DM=y
-CONFIG_SPL_DM=y
-CONFIG_DM_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
-CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_LPC32XX_SSP=y
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/2 arm: lpc32xx: add CONFIG_ARCH_LPC32XX build option

Quoted 7 lines · Vladimir Zapolskiy

The explicit arch specific build symbol allows to group supported boards, generalize common config options and it will serve as a dependency for platform only drivers.

Two related board defconfigs are resynced after the change.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181020/e86ad6f1/attachment.sig>
author maintainer
#3 lore raw

PATCH 2/2 Makefile: add LPC32xx precondition for building platform images

In reply to Vladimir Zapolskiy

To prevent accidental build failures the change converts a number of NXP LPC32xx specific image targets to be conditionally dependent on target build configuration. The wrapped image targets always contain a U-Boot SPL binary and the images are supposed to be directly flashed on a NAND flash device for read access by LPC32xx NAND MLC controller.

---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
Makefile +2 -0
index e38966edbaa7..76f1e537cb64 100644
@@ -1131,6 +1131,7 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
 u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE
 	$(call if_changed,pad_cat)
 
+ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
 MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
 
 lpc32xx-spl.img: spl/u-boot-spl.bin FORCE
@@ -1150,6 +1151,7 @@ lpc32xx-full.bin: lpc32xx-boot-0.bin lpc32xx-boot-1.bin u-boot.img FORCE
 	$(call if_changed,cat)
 
 CLEAN_FILES += lpc32xx-*
+endif
 
 OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \
 				   --pad-to=$(CONFIG_TPL_PAD_TO)
Signature · 1 line
2.17.1
#4 lore raw

PATCH 2/2 Makefile: add LPC32xx precondition for building platform images

Quoted 7 lines · Vladimir Zapolskiy

To prevent accidental build failures the change converts a number of NXP LPC32xx specific image targets to be conditionally dependent on target build configuration. The wrapped image targets always contain a U-Boot SPL binary and the images are supposed to be directly flashed on a NAND flash device for read access by LPC32xx NAND MLC controller.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181020/20c266d3/attachment.sig>
author maintainer
#5 lore raw

cover arm: lpc32xx: create platform specific Kconfig file

In reply to Vladimir Zapolskiy

Hi Tom,

Quoted 14 lines · Vladimir Zapolskiy

There is a need to introduce ARCH_LPC32XX build config symbol to improve selection of build options for drivers, which are specific to NXP LPC32xx platform only. At the same time the new Kconfig file and sections can be used to describe common SoC properties and collect entries of all LPC32xx boards.

The presented two patches are the initial ones in the series of LPC32xx device driver changes, which move LPC32xx board specific options from include/configs/* to build system and board configs.

Vladimir Zapolskiy (2):
arm: lpc32xx: add CONFIG_ARCH_LPC32XX build option
Makefile: add LPC32xx precondition for building platform images

Quoted 10 lines
 Makefile                                |  2 ++
 arch/arm/Kconfig                        | 24 ++++++++++++------------
 arch/arm/cpu/arm926ejs/lpc32xx/Kconfig  | 20 ++++++++++++++++++++
 board/timll/devkit3250/Kconfig          |  3 ---
 board/work-microwave/work_92105/Kconfig |  3 ---
 configs/devkit3250_defconfig            |  6 +-----
 configs/work_92105_defconfig            | 11 ++++-------
 7 files changed, 39 insertions(+), 30 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/Kconfig

I kindly ask you to apply these 2 patches, because I have 30+ changes in my queue which depend on these ones.

I've also added support of NXP LPC18xx/LPC43xx (ARMv7-M) to U-Boot, so it might be desired to add an lpc project to get merges faster.

Thank you in advance.

--
Best wishes,
Vladimir