[U-Boot] [PATCH v3 1/3] mx25: Move MX25 selection to Kconfig

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

From: Fabio Estevam fabio.estevam@nxp.com
When a high speed card is connected to mx25 the following error is seen:
U-Boot 2017.11-rc2-00104-gb79372a (Oct 31 2017 - 11:02:22 -0200)
CPU: Freescale i.MX25 rev1.2 at 399 MHz Reset cause: POR Board: MX25PDK I2C: ready DRAM: 64 MiB No arch specific invalidate_icache_all available! MMC: FSL_SDHC: 0 *** Warning - read failed, using default environment In: serial Out: serial Err: serial Net: FEC Hit any key to stop autoboot: 0 => saveenv Saving Environment to MMC... Writing to MMC(0)... failed
, which prevents any usage of the SD card.
The root cause for the failure is the eSDHC-A001 erratum:
"eSDHC-A001 : Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 0x4,0x8, and 0xC" that is listed on some PowerArchitecture chips: https://www.nxp.com/files-static/32bit/doc/errata/MPC8379ECE.pdf
Even though eSDHC-A001 is not documented on the i.MX25 errata document, I have confirmed with the NXP design team that this erratum does affect i.MX25, so fix the problem by selecting SYS_FSL_ERRATUM_ESDHC_A001 at SoC level.
Successfully tested with a high speed SD card on a mx25pdk board.
Suggested-by: Benoît Thébaudeau benoit@wsystem.com 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: - Remove duplicated paragraph.
arch/arm/mach-imx/mx2/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/mx2/Kconfig b/arch/arm/mach-imx/mx2/Kconfig index 5e985a6..ea308fc 100644 --- a/arch/arm/mach-imx/mx2/Kconfig +++ b/arch/arm/mach-imx/mx2/Kconfig @@ -3,6 +3,7 @@ if ARCH_MX25 config MX25 bool default y + select SYS_FSL_ERRATUM_ESDHC_A001 choice prompt "MX25 board select" optional

On Fri, Nov 3, 2017 at 1:40 PM, Fabio Estevam festevam@gmail.com wrote:
From: Fabio Estevam fabio.estevam@nxp.com
When a high speed card is connected to mx25 the following error is seen:
U-Boot 2017.11-rc2-00104-gb79372a (Oct 31 2017 - 11:02:22 -0200)
CPU: Freescale i.MX25 rev1.2 at 399 MHz Reset cause: POR Board: MX25PDK I2C: ready DRAM: 64 MiB No arch specific invalidate_icache_all available! MMC: FSL_SDHC: 0 *** Warning - read failed, using default environment In: serial Out: serial Err: serial Net: FEC Hit any key to stop autoboot: 0 => saveenv Saving Environment to MMC... Writing to MMC(0)... failed
, which prevents any usage of the SD card.
The root cause for the failure is the eSDHC-A001 erratum:
"eSDHC-A001 : Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 0x4,0x8, and 0xC" that is listed on some PowerArchitecture chips: https://www.nxp.com/files-static/32bit/doc/errata/MPC8379ECE.pdf
Even though eSDHC-A001 is not documented on the i.MX25 errata document, I have confirmed with the NXP design team that this erratum does affect i.MX25, so fix the problem by selecting SYS_FSL_ERRATUM_ESDHC_A001 at SoC level.
Successfully tested with a high speed SD card on a mx25pdk board.
Suggested-by: Benoît Thébaudeau benoit@wsystem.com Signed-off-by: Fabio Estevam fabio.estevam@nxp.com Acked-by: Sebastien Bourdelin sebastien.bourdelin@savoirfairelinux.com
Acked-by: Otavio Salvador otavio@ossystems.com.br Tested-by: Otavio Salvador otavio@ossystems.com.br # mx25pdk

From: Fabio Estevam fabio.estevam@nxp.com
When a high speed card is connected to mx51evk the following error is seen:
U-Boot 2017.11-rc2 (Oct 18 2017 - 13:49:26 -0200)
CPU: Freescale i.MX51 rev3.0 at 800 MHz Reset cause: POR Board: MX51EVK DRAM: 512 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 *** Warning - read failed, using default environment
In: serial Out: serial Err: serial Net: FEC Hit any key to stop autoboot: 0 => saveenv Saving Environment to MMC... Writing to MMC(0)... failed
The root cause for the failure is the eSDHC-A001 erratum:
"eSDHC-A001 : Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 0x4,0x8, and 0xC" that is listed on some PowerArchitecture chips: https://www.nxp.com/files-static/32bit/doc/errata/MPC8379ECE.pdf
Even though eSDHC-A001 is not documented on the i.MX51 errata document, I have confirmed with the NXP design team that this erratum does affect i.MX51, so fix the problem by selecting SYS_FSL_ERRATUM_ESDHC_A001 at SoC level.
The i.MX51 ts4800 board already selects this option, but it is better to move this selection to the i.MX51 SoC level instead.
Successfully tested with a high speed SD card on a mx51evk board.
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/mach-imx/mx5/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig index ef37c35..d96020d 100644 --- a/arch/arm/mach-imx/mx5/Kconfig +++ b/arch/arm/mach-imx/mx5/Kconfig @@ -6,6 +6,7 @@ config MX5
config MX51 bool + select SYS_FSL_ERRATUM_ESDHC_A001
config MX53 bool @@ -52,7 +53,6 @@ config TARGET_MX53SMD config TARGET_TS4800 bool "Support TS4800" select MX51 - select SYS_FSL_ERRATUM_ESDHC_A001
config TARGET_USBARMORY bool "Support USB armory"

On Fri, Nov 3, 2017 at 4:40 PM, Fabio Estevam festevam@gmail.com wrote:
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
[...]
For the series: Reviewed-by: Benoît Thébaudeau benoit.thebaudeau.dev@gmail.com

Hi Stefano and Tom,
On Fri, Nov 3, 2017 at 1:40 PM, Fabio Estevam festevam@gmail.com wrote:
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
Could you please consider this series (bug fix) for 2017.11?
Thanks

On Mon, Nov 06, 2017 at 09:44:40PM -0200, Fabio Estevam wrote:
Hi Stefano and Tom,
On Fri, Nov 3, 2017 at 1:40 PM, Fabio Estevam festevam@gmail.com wrote:
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
Could you please consider this series (bug fix) for 2017.11?
Otavio brought this up to me as well today, I would be happy to see this come in as a bugfix. Thanks!

Hi Tom,
On 07/11/2017 02:22, Tom Rini wrote:
On Mon, Nov 06, 2017 at 09:44:40PM -0200, Fabio Estevam wrote:
Hi Stefano and Tom,
On Fri, Nov 3, 2017 at 1:40 PM, Fabio Estevam festevam@gmail.com wrote:
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
Could you please consider this series (bug fix) for 2017.11?
Otavio brought this up to me as well today, I would be happy to see this come in as a bugfix. Thanks!
I merge into u-boot-imx and I'll send my PR - thanks !
Best regards, Stefano

Hi Stefano, Tom,
On Tue, Nov 7, 2017 at 10:10 AM, Stefano Babic sbabic@denx.de wrote:
On 07/11/2017 02:22, Tom Rini wrote:
On Mon, Nov 06, 2017 at 09:44:40PM -0200, Fabio Estevam wrote:
Hi Stefano and Tom,
On Fri, Nov 3, 2017 at 1:40 PM, Fabio Estevam festevam@gmail.com wrote:
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
Could you please consider this series (bug fix) for 2017.11?
Otavio brought this up to me as well today, I would be happy to see this come in as a bugfix. Thanks!
I merge into u-boot-imx and I'll send my PR - thanks !
I have seen other PRs going through, but nothing for this series. Please do not forget.
Best regards, Benoît

Hi Benoît,
On Fri, Nov 10, 2017 at 6:19 PM, Benoît Thébaudeau benoit.thebaudeau.dev@gmail.com wrote:
I have seen other PRs going through, but nothing for this series. Please do not forget.
It has already been applied in master now :-)
participants (5)
-
Benoît Thébaudeau
-
Fabio Estevam
-
Otavio Salvador
-
Stefano Babic
-
Tom Rini