Skip to contentSkip to conversation

mx25: Move MX25 selection to Kconfig

PATCH New Fabio Estevam 5 participants 10 messages Nov 3, 2017 – Nov 10, 2017

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

From: Fabio Estevam <[email protected]>

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.

---
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
arch/arm/Kconfig +6 -13
index 83b7aa5..30e71b2 100644
@@ -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"
arch/arm/mach-imx/mx2/Kconfig new file +29 -0
new file mode 100644
index 0000000..5e985a6
@@ -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
configs/mx25pdk_defconfig +1 -0
index 1ea58ee..81a12f13 100644
@@ -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
configs/zmx25_defconfig +1 -0
index f323db3..4c4a361 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX25=y
 CONFIG_TARGET_ZMX25=y
 CONFIG_BOOTDELAY=5
 # CONFIG_DISPLAY_CPUINFO is not set
include/configs/mx25pdk.h +0 -1
index bb100c4..8e8946a 100644
@@ -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
include/configs/zmx25.h +0 -1
index d566fe5..1ae1ca4 100644
@@ -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
Signature · 1 line
2.7.4
author reviewer
#1 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

Hi Stefano and Tom,

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Could you please consider this series (bug fix) for 2017.11?

Thanks

#2 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

Quoted 9 lines · Fabio Estevam

Hi Stefano and Tom,

Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Quoted 7 lines
Quoted 5 lines

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

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!

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/20171106/d75384d3/attachment.sig>
#3 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

Hi Tom,

Quoted 13 lines · Tom Rini
Quoted 12 lines · Fabio Estevam

Hi Stefano and Tom,

Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

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

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

Hi Stefano, Tom,

Quoted 17 lines · Stefano Babic
Quoted 16 lines · Tom Rini
Quoted 15 lines · Fabio Estevam

Hi Stefano and Tom,

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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

author reviewer
#5 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

Hi Benoît,

Quoted 2 lines · Benoît Thébaudeau

I have seen other PRs going through, but nothing for this series. Please do not forget.

It has already been applied in master now :-)

author reviewer
#6 lore raw

PATCH v3 2/3 mx25: Select the ESDHC_A001 erratum

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

---
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(+)
arch/arm/mach-imx/mx2/Kconfig +1 -0
index 5e985a6..ea308fc 100644
@@ -3,6 +3,7 @@ if ARCH_MX25
 config MX25
 	bool
 	default y
+	select SYS_FSL_ERRATUM_ESDHC_A001
 choice
 	prompt "MX25 board select"
 	optional
Signature · 1 line
2.7.4
#7 lore raw

PATCH v3 2/3 mx25: Select the ESDHC_A001 erratum

Quoted 37 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Quoted 5 lines

Successfully tested with a high speed SD card on a mx25pdk board.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#8 lore raw

PATCH v3 1/3 mx25: Move MX25 selection to Kconfig

In reply to Fabio Estevam
Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

[...]

For the series:

author reviewer
#9 lore raw

PATCH v3 3/3 mx51: Select the ESDHC_A001 erratum

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

---
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(-)
arch/arm/mach-imx/mx5/Kconfig +1 -1
index ef37c35..d96020d 100644
@@ -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"
Signature · 1 line
2.7.4