]> code.ossystems Code Review - bsp/u-boot.git/commitdiff
mx25: Move MX25 selection to Kconfig
authorFabio Estevam <fabio.estevam@nxp.com>
Fri, 3 Nov 2017 15:40:08 +0000 (13:40 -0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 6 Nov 2017 17:19:31 +0000 (15:19 -0200)
The motivation for moving MX25 selection to Kconfig is to be
able to better handle MX25 specific errata, so that an errata option
can be selected at SoC level instead of board level.

This selection method also aligns with the way other i.MX SoCs are
selected in U-Boot.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
arch/arm/Kconfig
arch/arm/mach-imx/mx2/Kconfig [new file with mode: 0644]
configs/mx25pdk_defconfig
configs/zmx25_defconfig
include/configs/mx25pdk.h
include/configs/zmx25.h

index 53eae8953e0bb23bdb76bb58605cef289fbd5b1e..18c5dd11eafac02c76be46d140f2467dfd010987 100644 (file)
@@ -341,17 +341,6 @@ config TARGET_WORK_92105
        select CPU_ARM926EJS
        select SUPPORT_SPL
 
-config TARGET_MX25PDK
-       bool "Support mx25pdk"
-       select BOARD_LATE_INIT
-       select CPU_ARM926EJS
-       select BOARD_EARLY_INIT_F
-
-config TARGET_ZMX25
-       bool "Support zmx25"
-       select BOARD_LATE_INIT
-       select CPU_ARM926EJS
-
 config TARGET_APF27
        bool "Support apf27"
        select CPU_ARM926EJS
@@ -598,6 +587,10 @@ config ARCH_MESON
          targeted at media players and tablet computers. We currently
          support the S905 (GXBaby) 64-bit SoC.
 
+config ARCH_MX25
+       bool "NXP MX25"
+       select CPU_ARM926EJS
+
 config ARCH_MX7ULP
         bool "NXP MX7ULP"
         select CPU_V7
@@ -1124,6 +1117,8 @@ source "arch/arm/mach-mvebu/Kconfig"
 
 source "arch/arm/cpu/armv7/ls102xa/Kconfig"
 
+source "arch/arm/mach-imx/mx2/Kconfig"
+
 source "arch/arm/mach-imx/mx7ulp/Kconfig"
 
 source "arch/arm/mach-imx/mx7/Kconfig"
@@ -1203,7 +1198,6 @@ source "board/freescale/ls1012aqds/Kconfig"
 source "board/freescale/ls1012ardb/Kconfig"
 source "board/freescale/ls1012afrdm/Kconfig"
 source "board/freescale/mx23evk/Kconfig"
-source "board/freescale/mx25pdk/Kconfig"
 source "board/freescale/mx28evk/Kconfig"
 source "board/freescale/mx31ads/Kconfig"
 source "board/freescale/mx31pdk/Kconfig"
@@ -1229,7 +1223,6 @@ source "board/spear/spear320/Kconfig"
 source "board/spear/spear600/Kconfig"
 source "board/spear/x600/Kconfig"
 source "board/st/stv0991/Kconfig"
-source "board/syteco/zmx25/Kconfig"
 source "board/tcl/sl50/Kconfig"
 source "board/birdland/bav335x/Kconfig"
 source "board/timll/devkit3250/Kconfig"
diff --git a/arch/arm/mach-imx/mx2/Kconfig b/arch/arm/mach-imx/mx2/Kconfig
new file mode 100644 (file)
index 0000000..5e985a6
--- /dev/null
@@ -0,0 +1,29 @@
+if ARCH_MX25
+
+config MX25
+       bool
+       default y
+choice
+       prompt "MX25 board select"
+       optional
+
+config TARGET_MX25PDK
+       bool "Support mx25pdk"
+       select BOARD_LATE_INIT
+       select CPU_ARM926EJS
+       select BOARD_EARLY_INIT_F
+
+config TARGET_ZMX25
+       bool "Support zmx25"
+       select BOARD_LATE_INIT
+       select CPU_ARM926EJS1
+
+endchoice
+
+config SYS_SOC
+       default "mx25"
+
+source "board/freescale/mx25pdk/Kconfig"
+source "board/syteco/zmx25/Kconfig"
+
+endif
index 8ed394569a3fd7f063a7eb03208f198823bd2d96..9df3cb1657bf008c07dcaa205bf315222f69f468 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX25=y
 CONFIG_TARGET_MX25PDK=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx25pdk/imximage.cfg"
 CONFIG_BOOTDELAY=1
index 95b13096a424aeee6dbc67801378894358d14734..e6f6561914935884265a8eae548d013d54643722 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX25=y
 CONFIG_TARGET_ZMX25=y
 CONFIG_BOOTDELAY=5
 # CONFIG_DISPLAY_CPUINFO is not set
index 808522fe1c33d62854c20833a115c014c6c5ba30..91e624f1f0d68db6e5353b4a6d955b2fe24acced 100644 (file)
@@ -11,7 +11,6 @@
 
 /* High Level Configuration Options */
 
-#define CONFIG_MX25
 #define CONFIG_SYS_TEXT_BASE           0x81200000
 #define CONFIG_MXC_GPIO
 #define CONFIG_SYS_FSL_CLK
index d566fe5a2f3d80c741eeb3faea865196548728dc..1ae1ca4317f2f091fb115f28d7dfbc42a06a50b8 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <asm/arch/imx-regs.h>
 
-#define CONFIG_MX25
 #define CONFIG_SYS_TEXT_BASE           0xA0000000
 
 #define CONFIG_SYS_TIMER_RATE          32768