All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/3] mx25: Move MX25 selection to Kconfig
Date: Fri,  3 Nov 2017 13:40:08 -0200	[thread overview]
Message-ID: <1509723610-27434-1-git-send-email-festevam@gmail.com> (raw)

From: Fabio Estevam <fabio.estevam@nxp.com>

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>
---
Changes since v2:
- Put the U-Boot list on Cc.

Changes since v1:
- None

 arch/arm/Kconfig              | 19 ++++++-------------
 arch/arm/mach-imx/mx2/Kconfig | 29 +++++++++++++++++++++++++++++
 configs/mx25pdk_defconfig     |  1 +
 configs/zmx25_defconfig       |  1 +
 include/configs/mx25pdk.h     |  1 -
 include/configs/zmx25.h       |  1 -
 6 files changed, 37 insertions(+), 15 deletions(-)
 create mode 100644 arch/arm/mach-imx/mx2/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 83b7aa5..30e71b2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
@@ -599,6 +588,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
@@ -1162,6 +1155,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"
@@ -1244,7 +1239,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"
@@ -1270,7 +1264,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
index 0000000..5e985a6
--- /dev/null
+++ b/arch/arm/mach-imx/mx2/Kconfig
@@ -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
diff --git a/configs/mx25pdk_defconfig b/configs/mx25pdk_defconfig
index 1ea58ee..81a12f13 100644
--- a/configs/mx25pdk_defconfig
+++ b/configs/mx25pdk_defconfig
@@ -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
diff --git a/configs/zmx25_defconfig b/configs/zmx25_defconfig
index f323db3..4c4a361 100644
--- a/configs/zmx25_defconfig
+++ b/configs/zmx25_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX25=y
 CONFIG_TARGET_ZMX25=y
 CONFIG_BOOTDELAY=5
 # CONFIG_DISPLAY_CPUINFO is not set
diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h
index bb100c4..8e8946a 100644
--- a/include/configs/mx25pdk.h
+++ b/include/configs/mx25pdk.h
@@ -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
diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h
index d566fe5..1ae1ca4 100644
--- a/include/configs/zmx25.h
+++ b/include/configs/zmx25.h
@@ -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
-- 
2.7.4

             reply	other threads:[~2017-11-03 15:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 15:40 Fabio Estevam [this message]
2017-11-03 15:40 ` [U-Boot] [PATCH v3 2/3] mx25: Select the ESDHC_A001 erratum Fabio Estevam
2017-11-03 19:48   ` Otavio Salvador
2017-11-03 15:40 ` [U-Boot] [PATCH v3 3/3] mx51: " Fabio Estevam
2017-11-03 21:21 ` [U-Boot] [PATCH v3 1/3] mx25: Move MX25 selection to Kconfig Benoît Thébaudeau
2017-11-06 23:44 ` Fabio Estevam
2017-11-07  1:22   ` Tom Rini
2017-11-07  9:10     ` Stefano Babic
2017-11-10 20:19       ` Benoît Thébaudeau
2017-11-10 20:47         ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509723610-27434-1-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.