Skip to contentSkip to conversation

ARM: imx6: dh-imx6: Enable d-cache early in SPL

PATCH Superseded Philip Oberfichtner 7 participants 22 messages Aug 9, 2022 – Aug 16, 2022

Subsystems (5)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover ARM: imx6: dh-imx6: Enable d-cache early in SPL

This patch series enables d-cache in SPL for i.MX6 based boards from DH in order to improve boot time.

This can only be achieved after migrating the corresponding symbols to Kconfig, which is done in patch 1/3 and 2/3.

Changes in v3:
- Introduce CONFIG_SPL_SYS_L2_PL310
- Convert CONFIG_SYS_L2_PL310 to Kconfig
- Use newly introduced Kconfig symbol for dh_imx6_defconfig

Changes in v2:
- Add comment to explain the relevance of dcache_disable()

Marek Vasut (1):
ARM: imx6: dh-imx6: Enable d-cache early in SPL

Philip Oberfichtner (2):
Convert CONFIG_SYS_L2_PL310 to Kconfig
ARM: cache: Allow SPL to build cache-pl310.c

 README                                    |  2 --
 arch/arm/Kconfig                          |  9 ++++++++
 arch/arm/lib/Makefile                     |  2 +-
 arch/arm/mach-mvebu/include/mach/config.h |  2 --
 board/dhelectronics/dh_imx6/dh_imx6_spl.c | 28 +++++++++++++++++++++++
 configs/am43xx_evm_defconfig              |  1 +
 configs/am43xx_evm_qspiboot_defconfig     |  1 +
 configs/am43xx_evm_rtconly_defconfig      |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig |  1 +
 configs/am43xx_hs_evm_defconfig           |  1 +
 configs/am43xx_hs_evm_qspi_defconfig      |  1 +
 configs/apalis_imx6_defconfig             |  1 +
 configs/aristainetos2c_defconfig          |  1 +
 configs/aristainetos2ccslb_defconfig      |  1 +
 configs/clearfog_defconfig                |  1 +
 configs/cm_fx6_defconfig                  |  1 +
 configs/cm_t43_defconfig                  |  1 +
 configs/colibri_imx6_defconfig            |  1 +
 configs/controlcenterdc_defconfig         |  1 +
 configs/crs305-1g-4s-bit_defconfig        |  1 +
 configs/crs305-1g-4s_defconfig            |  1 +
 configs/crs326-24g-2s-bit_defconfig       |  1 +
 configs/crs326-24g-2s_defconfig           |  1 +
 configs/crs328-4c-20s-4s-bit_defconfig    |  1 +
 configs/crs328-4c-20s-4s_defconfig        |  1 +
 configs/db-88f6720_defconfig              |  1 +
 configs/db-88f6820-amc_defconfig          |  1 +
 configs/db-88f6820-gp_defconfig           |  1 +
 configs/db-mv784mp-gp_defconfig           |  1 +
 configs/db-xc3-24g4xg_defconfig           |  1 +
 configs/dh_imx6_defconfig                 |  2 ++
 configs/display5_defconfig                |  1 +
 configs/display5_factory_defconfig        |  1 +
 configs/ds414_defconfig                   |  1 +
 configs/ge_b1x5v2_defconfig               |  1 +
 configs/ge_bx50v3_defconfig               |  1 +
 configs/gwventana_emmc_defconfig          |  1 +
 configs/gwventana_gw5904_defconfig        |  1 +
 configs/gwventana_nand_defconfig          |  1 +
 configs/helios4_defconfig                 |  1 +
 configs/imx6dl_icore_nand_defconfig       |  1 +
 configs/imx6dl_mamoj_defconfig            |  1 +
 configs/imx6q_bosch_acc_defconfig         |  1 +
 configs/imx6q_icore_nand_defconfig        |  1 +
 configs/imx6q_logic_defconfig             |  1 +
 configs/imx6qdl_icore_mipi_defconfig      |  1 +
 configs/imx6qdl_icore_mmc_defconfig       |  1 +
 configs/imx6qdl_icore_nand_defconfig      |  1 +
 configs/imx6qdl_icore_rqs_defconfig       |  1 +
 configs/kp_imx6q_tpc_defconfig            |  1 +
 configs/marsboard_defconfig               |  1 +
 configs/maxbcm_defconfig                  |  1 +
 configs/mccmon6_nor_defconfig             |  1 +
 configs/mccmon6_sd_defconfig              |  1 +
 configs/mx6cuboxi_defconfig               |  1 +
 configs/mx6memcal_defconfig               |  1 +
 configs/mx6qsabrelite_defconfig           |  1 +
 configs/mx6sabreauto_defconfig            |  1 +
 configs/mx6sabresd_defconfig              |  1 +
 configs/mx6slevk_defconfig                |  1 +
 configs/mx6slevk_spinor_defconfig         |  1 +
 configs/mx6slevk_spl_defconfig            |  1 +
 configs/mx6sllevk_defconfig               |  1 +
 configs/mx6sllevk_plugin_defconfig        |  1 +
 configs/mx6sxsabreauto_defconfig          |  1 +
 configs/mx6sxsabresd_defconfig            |  1 +
 configs/nitrogen6dl2g_defconfig           |  1 +
 configs/nitrogen6dl_defconfig             |  1 +
 configs/nitrogen6q2g_defconfig            |  1 +
 configs/nitrogen6q_defconfig              |  1 +
 configs/nitrogen6s1g_defconfig            |  1 +
 configs/nitrogen6s_defconfig              |  1 +
 configs/novena_defconfig                  |  1 +
 configs/omap4_panda_defconfig             |  1 +
 configs/omap4_sdp4430_defconfig           |  1 +
 configs/pcm058_defconfig                  |  1 +
 configs/pico-imx6_defconfig               |  1 +
 configs/poleg_evb_defconfig               |  1 +
 configs/riotboard_defconfig               |  1 +
 configs/socfpga_arria10_defconfig         |  1 +
 configs/socfpga_arria5_defconfig          |  1 +
 configs/socfpga_chameleonv3_defconfig     |  1 +
 configs/socfpga_cyclone5_defconfig        |  1 +
 configs/socfpga_dbm_soc1_defconfig        |  1 +
 configs/socfpga_de0_nano_soc_defconfig    |  1 +
 configs/socfpga_de10_nano_defconfig       |  1 +
 configs/socfpga_de10_standard_defconfig   |  1 +
 configs/socfpga_de1_soc_defconfig         |  1 +
 configs/socfpga_is1_defconfig             |  1 +
 configs/socfpga_mcvevk_defconfig          |  1 +
 configs/socfpga_secu1_defconfig           |  1 +
 configs/socfpga_sockit_defconfig          |  1 +
 configs/socfpga_socrates_defconfig        |  1 +
 configs/socfpga_sr1500_defconfig          |  1 +
 configs/socfpga_vining_fpga_defconfig     |  1 +
 configs/stemmy_defconfig                  |  1 +
 configs/tbs2910_defconfig                 |  1 +
 configs/theadorable_debug_defconfig       |  1 +
 configs/tqma6dl_mba6_mmc_defconfig        |  1 +
 configs/tqma6dl_mba6_spi_defconfig        |  1 +
 configs/tqma6q_mba6_mmc_defconfig         |  1 +
 configs/tqma6q_mba6_spi_defconfig         |  1 +
 configs/tqma6s_mba6_mmc_defconfig         |  1 +
 configs/tqma6s_mba6_spi_defconfig         |  1 +
 configs/turris_omnia_defconfig            |  1 +
 configs/udoo_defconfig                    |  1 +
 configs/udoo_neo_defconfig                |  1 +
 configs/vining_2000_defconfig             |  1 +
 configs/wandboard_defconfig               |  1 +
 configs/warp_defconfig                    |  1 +
 configs/x530_defconfig                    |  1 +
 include/configs/am43xx_evm.h              |  1 -
 include/configs/brppt2.h                  |  1 -
 include/configs/cm_t43.h                  |  1 -
 include/configs/mx6_common.h              |  1 -
 include/configs/odroid.h                  |  1 -
 include/configs/poleg.h                   |  1 -
 include/configs/socfpga_common.h          |  1 -
 include/configs/stemmy.h                  |  1 -
 include/configs/ti_omap4_common.h         |  1 -
 include/configs/trats.h                   |  1 -
 include/configs/trats2.h                  |  1 -
 include/configs/zynq-common.h             |  1 -
 scripts/config_whitelist.txt              |  1 -
 124 files changed, 145 insertions(+), 18 deletions(-)
Signature · 1 line
2.37.1
#1 lore raw

PATCH v3 1/3 Convert CONFIG_SYS_L2_PL310 to Kconfig

This converts CONFIG_SYS_L2_PL310 to Kconfig.

---

Changes in v3:
new

 README                                    | 2 --
 arch/arm/Kconfig                          | 4 ++++
 arch/arm/mach-mvebu/include/mach/config.h | 2 --
 configs/am43xx_evm_defconfig              | 1 +
 configs/am43xx_evm_qspiboot_defconfig     | 1 +
 configs/am43xx_evm_rtconly_defconfig      | 1 +
 configs/am43xx_evm_usbhost_boot_defconfig | 1 +
 configs/am43xx_hs_evm_defconfig           | 1 +
 configs/am43xx_hs_evm_qspi_defconfig      | 1 +
 configs/apalis_imx6_defconfig             | 1 +
 configs/aristainetos2c_defconfig          | 1 +
 configs/aristainetos2ccslb_defconfig      | 1 +
 configs/clearfog_defconfig                | 1 +
 configs/cm_fx6_defconfig                  | 1 +
 configs/cm_t43_defconfig                  | 1 +
 configs/colibri_imx6_defconfig            | 1 +
 configs/controlcenterdc_defconfig         | 1 +
 configs/crs305-1g-4s-bit_defconfig        | 1 +
 configs/crs305-1g-4s_defconfig            | 1 +
 configs/crs326-24g-2s-bit_defconfig       | 1 +
 configs/crs326-24g-2s_defconfig           | 1 +
 configs/crs328-4c-20s-4s-bit_defconfig    | 1 +
 configs/crs328-4c-20s-4s_defconfig        | 1 +
 configs/db-88f6720_defconfig              | 1 +
 configs/db-88f6820-amc_defconfig          | 1 +
 configs/db-88f6820-gp_defconfig           | 1 +
 configs/db-mv784mp-gp_defconfig           | 1 +
 configs/db-xc3-24g4xg_defconfig           | 1 +
 configs/dh_imx6_defconfig                 | 1 +
 configs/display5_defconfig                | 1 +
 configs/display5_factory_defconfig        | 1 +
 configs/ds414_defconfig                   | 1 +
 configs/ge_b1x5v2_defconfig               | 1 +
 configs/ge_bx50v3_defconfig               | 1 +
 configs/gwventana_emmc_defconfig          | 1 +
 configs/gwventana_gw5904_defconfig        | 1 +
 configs/gwventana_nand_defconfig          | 1 +
 configs/helios4_defconfig                 | 1 +
 configs/imx6dl_icore_nand_defconfig       | 1 +
 configs/imx6dl_mamoj_defconfig            | 1 +
 configs/imx6q_bosch_acc_defconfig         | 1 +
 configs/imx6q_icore_nand_defconfig        | 1 +
 configs/imx6q_logic_defconfig             | 1 +
 configs/imx6qdl_icore_mipi_defconfig      | 1 +
 configs/imx6qdl_icore_mmc_defconfig       | 1 +
 configs/imx6qdl_icore_nand_defconfig      | 1 +
 configs/imx6qdl_icore_rqs_defconfig       | 1 +
 configs/kp_imx6q_tpc_defconfig            | 1 +
 configs/marsboard_defconfig               | 1 +
 configs/maxbcm_defconfig                  | 1 +
 configs/mccmon6_nor_defconfig             | 1 +
 configs/mccmon6_sd_defconfig              | 1 +
 configs/mx6cuboxi_defconfig               | 1 +
 configs/mx6memcal_defconfig               | 1 +
 configs/mx6qsabrelite_defconfig           | 1 +
 configs/mx6sabreauto_defconfig            | 1 +
 configs/mx6sabresd_defconfig              | 1 +
 configs/mx6slevk_defconfig                | 1 +
 configs/mx6slevk_spinor_defconfig         | 1 +
 configs/mx6slevk_spl_defconfig            | 1 +
 configs/mx6sllevk_defconfig               | 1 +
 configs/mx6sllevk_plugin_defconfig        | 1 +
 configs/mx6sxsabreauto_defconfig          | 1 +
 configs/mx6sxsabresd_defconfig            | 1 +
 configs/nitrogen6dl2g_defconfig           | 1 +
 configs/nitrogen6dl_defconfig             | 1 +
 configs/nitrogen6q2g_defconfig            | 1 +
 configs/nitrogen6q_defconfig              | 1 +
 configs/nitrogen6s1g_defconfig            | 1 +
 configs/nitrogen6s_defconfig              | 1 +
 configs/novena_defconfig                  | 1 +
 configs/omap4_panda_defconfig             | 1 +
 configs/omap4_sdp4430_defconfig           | 1 +
 configs/pcm058_defconfig                  | 1 +
 configs/pico-imx6_defconfig               | 1 +
 configs/poleg_evb_defconfig               | 1 +
 configs/riotboard_defconfig               | 1 +
 configs/socfpga_arria10_defconfig         | 1 +
 configs/socfpga_arria5_defconfig          | 1 +
 configs/socfpga_chameleonv3_defconfig     | 1 +
 configs/socfpga_cyclone5_defconfig        | 1 +
 configs/socfpga_dbm_soc1_defconfig        | 1 +
 configs/socfpga_de0_nano_soc_defconfig    | 1 +
 configs/socfpga_de10_nano_defconfig       | 1 +
 configs/socfpga_de10_standard_defconfig   | 1 +
 configs/socfpga_de1_soc_defconfig         | 1 +
 configs/socfpga_is1_defconfig             | 1 +
 configs/socfpga_mcvevk_defconfig          | 1 +
 configs/socfpga_secu1_defconfig           | 1 +
 configs/socfpga_sockit_defconfig          | 1 +
 configs/socfpga_socrates_defconfig        | 1 +
 configs/socfpga_sr1500_defconfig          | 1 +
 configs/socfpga_vining_fpga_defconfig     | 1 +
 configs/stemmy_defconfig                  | 1 +
 configs/tbs2910_defconfig                 | 1 +
 configs/theadorable_debug_defconfig       | 1 +
 configs/tqma6dl_mba6_mmc_defconfig        | 1 +
 configs/tqma6dl_mba6_spi_defconfig        | 1 +
 configs/tqma6q_mba6_mmc_defconfig         | 1 +
 configs/tqma6q_mba6_spi_defconfig         | 1 +
 configs/tqma6s_mba6_mmc_defconfig         | 1 +
 configs/tqma6s_mba6_spi_defconfig         | 1 +
 configs/turris_omnia_defconfig            | 1 +
 configs/udoo_defconfig                    | 1 +
 configs/udoo_neo_defconfig                | 1 +
 configs/vining_2000_defconfig             | 1 +
 configs/wandboard_defconfig               | 1 +
 configs/warp_defconfig                    | 1 +
 configs/x530_defconfig                    | 1 +
 include/configs/am43xx_evm.h              | 1 -
 include/configs/brppt2.h                  | 1 -
 include/configs/cm_t43.h                  | 1 -
 include/configs/mx6_common.h              | 1 -
 include/configs/odroid.h                  | 1 -
 include/configs/poleg.h                   | 1 -
 include/configs/socfpga_common.h          | 1 -
 include/configs/stemmy.h                  | 1 -
 include/configs/ti_omap4_common.h         | 1 -
 include/configs/trats.h                   | 1 -
 include/configs/trats2.h                  | 1 -
 include/configs/zynq-common.h             | 1 -
 scripts/config_whitelist.txt              | 1 -
 122 files changed, 110 insertions(+), 17 deletions(-)
README +0 -2
index 623f359072..b4db223ecd 100644
@@ -507,8 +507,6 @@ The following options need to be configured:
 		the defaults discussed just above.
 
 - Cache Configuration for ARM:
-		CONFIG_SYS_L2_PL310 - Enable support for ARM PL310 L2 cache
-				      controller
 		CONFIG_SYS_PL310_BASE - Physical base address of PL310
 					controller register space
 
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
 	   density. For ARM architectures that support Thumb2 this flag will
 	   result in Thumb2 code generated by GCC.
 
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
 
 config SYS_L2CACHE_OFF
 	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
 #define MV88F78X60 /* for the DDR training bin_hdr code */
 #endif
 
-#define CONFIG_SYS_L2_PL310
-
 #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
 
 /* Needed for SPI NOR booting in SPL */
configs/am43xx_evm_defconfig +1 -0
index 41042ec4ad..bcce083f3f 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_ENV_SIZE=0x10000
configs/am43xx_evm_qspiboot_defconfig +1 -0
index 18be57a2fe..fb70d416be 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 # CONFIG_SYS_THUMB_BUILD is not set
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x30000000
 CONFIG_SYS_MALLOC_F_LEN=0x400
configs/am43xx_evm_rtconly_defconfig +1 -0
index ff5fbc6676..e5f7128a86 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_ENV_SIZE=0x10000
configs/am43xx_evm_usbhost_boot_defconfig +1 -0
index 5f0cc109d9..088f71477f 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_DM_GPIO=y
configs/am43xx_hs_evm_defconfig +1 -0
index bd151fedc8..4578710f25 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_TI_SECURE_DEVICE=y
 CONFIG_TI_COMMON_CMD_OPTIONS=y
configs/am43xx_hs_evm_qspi_defconfig +1 -0
index ddb49f4980..d5dcdb51ac 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 # CONFIG_SYS_THUMB_BUILD is not set
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_TI_SECURE_DEVICE=y
 CONFIG_ENV_SIZE=0x10000
configs/apalis_imx6_defconfig +1 -0
index 2efbc98f92..0564605d9a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x2000000
configs/aristainetos2c_defconfig +1 -0
index 26bcb00ff5..0ede558d81 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_F_LEN=0x13000
configs/aristainetos2ccslb_defconfig +1 -0
index 682903082c..2ca5753afe 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_F_LEN=0x13000
configs/clearfog_defconfig +1 -0
index 56dd3afa80..61c938ee77 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_SYS_THUMB_BUILD=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/cm_fx6_defconfig +1 -0
index 9bf78788e4..a97c2fbe19 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/cm_t43_defconfig +1 -0
index 96fec05012..c1b58fe11e 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_MALLOC_F_LEN=0x400
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/colibri_imx6_defconfig +1 -0
index fbaf11118a..6d6b4606d3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x2000000
configs/controlcenterdc_defconfig +1 -0
index 2fc7ba475a..cabdeb07f7 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_GPIO=y
configs/crs305-1g-4s-bit_defconfig +1 -0
index 1b46ab4bf9..114b360da6 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/mikrotik/crs3xx-98dx3236/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/crs305-1g-4s_defconfig +1 -0
index a7a3ffe481..9276a097e6 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/mikrotik/crs3xx-98dx3236/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/crs326-24g-2s-bit_defconfig +1 -0
index 70f71de6ae..c1fdc7c5c0 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/mikrotik/crs3xx-98dx3236/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/crs326-24g-2s_defconfig +1 -0
index 5991b62923..ba6de119b7 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/mikrotik/crs3xx-98dx3236/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/crs328-4c-20s-4s-bit_defconfig +1 -0
index 434e9fb90f..83be855f2c 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/mikrotik/crs3xx-98dx3236/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/crs328-4c-20s-4s_defconfig +1 -0
index 8e08cceaac..3379d34bdd 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/mikrotik/crs3xx-98dx3236/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/db-88f6720_defconfig +1 -0
index c08203e030..57dadaf5dd 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/db-88f6820-amc_defconfig +1 -0
index 07e0b1b6f4..528d65d241 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/db-88f6820-gp_defconfig +1 -0
index 390f229e58..870b4ba522 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/db-mv784mp-gp_defconfig +1 -0
index 55efa37328..5dbaee1e52 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/db-xc3-24g4xg_defconfig +1 -0
index 995835a96b..e1e36ffa2a 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_KWD_CONFIG="board/Marvell/db-xc3-24g4xg/kwbimage.cfg"
 CONFIG_SYS_TEXT_BASE=0x00800000
configs/dh_imx6_defconfig +1 -0
index 051816f719..11db9bac2c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_F_LEN=0x1000
configs/display5_defconfig +1 -0
index f586596ee9..44647e42dd 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/display5_factory_defconfig +1 -0
index e2f35a9790..3c5a43b0e8 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/ds414_defconfig +1 -0
index 7af7bb4e98..aeb022bc39 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SUPPORT_PASSING_ATAGS=y
 CONFIG_CMDLINE_TAG=y
configs/ge_b1x5v2_defconfig +1 -0
index c282990aa4..0437319fa0 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/ge_bx50v3_defconfig +1 -0
index c332878126..dc83c4a9e4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/gwventana_emmc_defconfig +1 -0
index 0516176e6d..31b1723194 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/gwventana_gw5904_defconfig +1 -0
index 63c87f17a5..79dae2da87 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/gwventana_nand_defconfig +1 -0
index 9d6819f19d..a896c39273 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/helios4_defconfig +1 -0
index f15a8e1d02..11cd68ecf6 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_SYS_THUMB_BUILD=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6dl_icore_nand_defconfig +1 -0
index 71e3d39597..b06dbc2286 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/imx6dl_mamoj_defconfig +1 -0
index 067498d80e..5854945f40 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x2300000
configs/imx6q_bosch_acc_defconfig +1 -0
index a2501ebc1a..f6bc3d1a83 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17780000
 CONFIG_SYS_MALLOC_LEN=0x01000000
configs/imx6q_icore_nand_defconfig +1 -0
index bf5f620ad8..709008f757 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/imx6q_logic_defconfig +1 -0
index 1510d10dc5..b0f7415f24 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/imx6qdl_icore_mipi_defconfig +1 -0
index bddc4ff98e..ba488ac417 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/imx6qdl_icore_mmc_defconfig +1 -0
index f8194a002a..c929ca6950 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/imx6qdl_icore_nand_defconfig +1 -0
index bf5f620ad8..709008f757 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/imx6qdl_icore_rqs_defconfig +1 -0
index cb2b0df98b..e75075188b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/kp_imx6q_tpc_defconfig +1 -0
index 8c5010d605..ababf6225c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_F_LEN=0x2200
configs/marsboard_defconfig +1 -0
index c7212ebcd3..c6bd79401e 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/maxbcm_defconfig +1 -0
index 35005fcc35..fd141965e2 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mccmon6_nor_defconfig +1 -0
index 80b59cbb05..45de04a8c6 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/mccmon6_sd_defconfig +1 -0
index 6984256a1c..593887d387 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/mx6cuboxi_defconfig +1 -0
index 1f15287369..99d6e37d76 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/mx6memcal_defconfig +1 -0
index 021e8a6151..3473a4287d 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x4000000
configs/mx6qsabrelite_defconfig +1 -0
index fa2c280a8d..44b0e91648 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/mx6sabreauto_defconfig +1 -0
index d9d429b4f9..4b2576c4cd 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/mx6sabresd_defconfig +1 -0
index ea0c764674..d2c76a97aa 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/mx6slevk_defconfig +1 -0
index 34f9b06dee..dcdcef4bd9 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/mx6slevk_spinor_defconfig +1 -0
index 5e54fd3eac..22959591a4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/mx6slevk_spl_defconfig +1 -0
index c05c33d0df..c769f45934 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/mx6sllevk_defconfig +1 -0
index ec6843e574..7cf4f6489b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/mx6sllevk_plugin_defconfig +1 -0
index bd44298cb2..57f11f7e5e 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x1000000
configs/mx6sxsabreauto_defconfig +1 -0
index d32ea1ea3c..1a973a23ea 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/mx6sxsabresd_defconfig +1 -0
index 1985ff96de..979d0982fe 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/nitrogen6dl2g_defconfig +1 -0
index 2d653d4d0d..8cbf2f891c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/nitrogen6dl_defconfig +1 -0
index 282fea4508..fb5c9fa04b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/nitrogen6q2g_defconfig +1 -0
index ec75ead6e2..b75cc42a13 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/nitrogen6q_defconfig +1 -0
index 1b999ecc9c..99a6a9592c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/nitrogen6s1g_defconfig +1 -0
index 60edd7d6e3..3e230fb9d3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/nitrogen6s_defconfig +1 -0
index 7d1da4cf6b..e70100240e 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/novena_defconfig +1 -0
index d4ab93850c..3de1cd5a7c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x4000000
configs/omap4_panda_defconfig +1 -0
index bd6c2ce4ca..899ba50a16 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="omap4-panda"
configs/omap4_sdp4430_defconfig +1 -0
index 62eb75d1f9..82cfc4ab1a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_OMAP2PLUS=y
configs/pcm058_defconfig +1 -0
index 132942bf55..3ea87ef133 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x800000
configs/pico-imx6_defconfig +1 -0
index 086b3ee3ab..84a9b03bd3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x2300000
configs/poleg_evb_defconfig +1 -0
index 16f6215148..4669c7fe86 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_NPCM=y
 CONFIG_SYS_TEXT_BASE=0x8200
 CONFIG_SYS_MALLOC_LEN=0x240000
configs/riotboard_defconfig +1 -0
index a2ef6187f8..9cdea61301 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/socfpga_arria10_defconfig +1 -0
index c98c106851..716a68a67b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_arria5_defconfig +1 -0
index 24c21090b1..810604ec03 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_chameleonv3_defconfig +1 -0
index e78d3b51de..80a965c7e2 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x4400
configs/socfpga_cyclone5_defconfig +1 -0
index d010b54240..7383fa1d3e 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_dbm_soc1_defconfig +1 -0
index a1574b6a5d..9f1bed2b75 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_de0_nano_soc_defconfig +1 -0
index ec7355d2cc..8e4154f46c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_de10_nano_defconfig +1 -0
index b62f029962..713048ab3a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_de10_standard_defconfig +1 -0
index b8bc9da4d0..67b2bafbe8 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_de1_soc_defconfig +1 -0
index 749ec540b4..8bae98e130 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_is1_defconfig +1 -0
index 958adfe25a..b7735689bc 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_mcvevk_defconfig +1 -0
index 18e125f5bd..0e47bcd4e7 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_secu1_defconfig +1 -0
index 83e24402a8..89df845ad7 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_SYS_MALLOC_F_LEN=0x800
configs/socfpga_sockit_defconfig +1 -0
index 2a02f1dbfa..c16b3e4820 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_socrates_defconfig +1 -0
index 3d0c48d766..7bcea6726b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x2000
configs/socfpga_sr1500_defconfig +1 -0
index def2ee8dbc..55388da88c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x4000
configs/socfpga_vining_fpga_defconfig +1 -0
index d0c87416ef..9c89d631f5 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_ENV_SIZE=0x4000
configs/stemmy_defconfig +1 -0
index 7fc0a39872..f1d3ef5b12 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_U8500=y
 CONFIG_SUPPORT_PASSING_ATAGS=y
 # CONFIG_SETUP_MEMORY_TAGS is not set
configs/tbs2910_defconfig +1 -0
index 892d7c60d2..36ef86058a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x8000000
configs/theadorable_debug_defconfig +1 -0
index a1dbc32e54..157641b76f 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/tqma6dl_mba6_mmc_defconfig +1 -0
index a02ee92785..21b90cb29a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_MALLOC_LEN=0x202000
 CONFIG_NR_DRAM_BANKS=1
configs/tqma6dl_mba6_spi_defconfig +1 -0
index 8f7e0ac101..d7e72fdfda 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_MALLOC_LEN=0x202000
 CONFIG_NR_DRAM_BANKS=1
configs/tqma6q_mba6_mmc_defconfig +1 -0
index 48822f388c..8e30fe7dc4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_MALLOC_LEN=0x202000
 CONFIG_NR_DRAM_BANKS=1
configs/tqma6q_mba6_spi_defconfig +1 -0
index ed774262ae..30a7813ab3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_MALLOC_LEN=0x202000
 CONFIG_NR_DRAM_BANKS=1
configs/tqma6s_mba6_mmc_defconfig +1 -0
index 9400c64812..7e8986c4e4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_MALLOC_LEN=0x202000
 CONFIG_NR_DRAM_BANKS=1
configs/tqma6s_mba6_spi_defconfig +1 -0
index ddbf9a757e..a8c946a296 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_MALLOC_LEN=0x202000
 CONFIG_NR_DRAM_BANKS=1
configs/turris_omnia_defconfig +1 -0
index ff16825fb4..346b846040 100644
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_SPL_SYS_THUMB_BUILD=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_GPIO=y
configs/udoo_defconfig +1 -0
index a1d2d7f2e4..e03bf9c6f9 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0x0200000
configs/udoo_neo_defconfig +1 -0
index e5ba2f3d09..eb488f4fe3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/vining_2000_defconfig +1 -0
index 8d87857ba0..a7211d4e1b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x300000
configs/wandboard_defconfig +1 -0
index 8b0533ce58..52101b7ac9 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_LEN=0xa00000
configs/warp_defconfig +1 -0
index 4c9f7051fe..31f0931cac 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SYS_MALLOC_LEN=0x2300000
configs/x530_defconfig +1 -0
index c52c9bdb06..7b1c38559a 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
include/configs/am43xx_evm.h +0 -1
index 87d3a27099..fc82a8c003 100644
@@ -29,7 +29,6 @@
 /* SPL defines. */
 
 /* Enabling L2 Cache */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE	0x48242000
 
 /*
include/configs/brppt2.h +0 -1
index adaba410ce..0c7fe5f3ab 100644
@@ -13,7 +13,6 @@
 
 /* -- i.mx6 specifica -- */
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE		L2_PL310_BASE
 #endif /* !CONFIG_SYS_L2CACHE_OFF */
 
include/configs/cm_t43.h +0 -1
index 07c5cb8ded..50cb2a4718 100644
@@ -36,7 +36,6 @@
 #define CONFIG_POWER_TPS65218
 
 /* Enabling L2 Cache */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE		0x48242000
 
 /*
include/configs/mx6_common.h +0 -1
index e416f81e43..4314556754 100644
@@ -12,7 +12,6 @@
 #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
 #else
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE	L2_PL310_BASE
 #endif
 
include/configs/odroid.h +0 -1
index 7448cc9520..babd3ca963 100644
@@ -14,7 +14,6 @@
 #include <configs/exynos4-common.h>
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE	0x10502000
 #endif
 
include/configs/poleg.h +0 -1
index f1c259f476..05253d59ef 100644
@@ -7,7 +7,6 @@
 #define __CONFIG_POLEG_H
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310		1
 #define CONFIG_SYS_PL310_BASE	0xF03FC000       /* L2 - Cache Regs Base (4k Space)*/
 #endif
 
include/configs/socfpga_common.h +0 -1
index 4a7da76e51..c3f30afe2b 100644
@@ -48,7 +48,6 @@
 /*
  * Cache
  */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE		SOCFPGA_MPUL2_ADDRESS
 
 /*
include/configs/stemmy.h +0 -1
index 71b25c23b1..3c70856fc7 100644
@@ -15,7 +15,6 @@
  */
 
 /* FIXME: This should be loaded from device tree... */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE		0xa0412000
 
 /* Linux does not boot if FDT / initrd is loaded to end of RAM */
include/configs/ti_omap4_common.h +0 -1
index 3d78972bfe..0568946fc8 100644
@@ -12,7 +12,6 @@
 #define __CONFIG_TI_OMAP4_COMMON_H
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310		1
 #define CONFIG_SYS_PL310_BASE	0x48242000
 #endif
 
include/configs/trats.h +0 -1
index 53f5a6996b..530b413d5b 100644
@@ -12,7 +12,6 @@
 #include <configs/exynos4-common.h>
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE	0x10502000
 #endif
 
include/configs/trats2.h +0 -1
index b7449dab8b..06c1fcd23e 100644
@@ -13,7 +13,6 @@
 #include <configs/exynos4-common.h>
 
 #ifndef CONFIG_SYS_L2CACHE_OFF
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE	0x10502000
 #endif
 
include/configs/zynq-common.h +0 -1
index 1fdde90654..6b0589dbe1 100644
@@ -11,7 +11,6 @@
 
 /* Cache options */
 #ifndef CONFIG_SYS_L2CACHE_OFF
-# define CONFIG_SYS_L2_PL310
 # define CONFIG_SYS_PL310_BASE		0xf8f02000
 #endif
 
scripts/config_whitelist.txt +0 -1
index fc07c5d257..b1c09ea62b 100644
@@ -967,7 +967,6 @@ CONFIG_SYS_JFFS2_FIRST_SECTOR
 CONFIG_SYS_JFFS2_NUM_BANKS
 CONFIG_SYS_KMBEC_FPGA_BASE
 CONFIG_SYS_KMBEC_FPGA_SIZE
-CONFIG_SYS_L2_PL310
 CONFIG_SYS_L2_SIZE
 CONFIG_SYS_L3_SIZE
 CONFIG_SYS_LATCH_ADDR
Signature · 1 line
2.37.1
#2 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 1 line · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 20 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
 	   density. For ARM architectures that support Thumb2 this flag will
 	   result in Thumb2 code generated by GCC.
 
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
 
 config SYS_L2CACHE_OFF
 	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -0
index 4add0d9e10..0bba0a4cf9 100644

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 8 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -2
@@ -25,8 +25,6 @@
 #define MV88F78X60 /* for the DDR training bin_hdr code */
 #endif
 
-#define CONFIG_SYS_L2_PL310
-
 #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
 
 /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

#3 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 30 lines · Pali Rohár
Quoted 1 line · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 27 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
  	   density. For ARM architectures that support Thumb2 this flag will
  	   result in Thumb2 code generated by GCC.
 
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
 
  config SYS_L2CACHE_OFF
  	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
  #define MV88F78X60 /* for the DDR training bin_hdr code */
  #endif
 
-#define CONFIG_SYS_L2_PL310
-
  #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
 
Quoted 7 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 1 line
arch/arm/mach-mvebu/include/mach/config.h +0 -0
  /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

#4 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 35 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 25 lines · Pali Rohár
Quoted 1 line · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
  	   density. For ARM architectures that support Thumb2 this flag will
  	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
  config SYS_L2CACHE_OFF
  	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
  #define MV88F78X60 /* for the DDR training bin_hdr code */
  #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
  #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
  /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

#5 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 41 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
   	   density. For ARM architectures that support Thumb2 this flag will
   	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
   config SYS_L2CACHE_OFF
   	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
   #define MV88F78X60 /* for the DDR training bin_hdr code */
   #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
   #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
   /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

Quoted 7 lines

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

So why should the user be unable to deselect L2CC support on MVEBU ?
I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

#6 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 53 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 41 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
   	   density. For ARM architectures that support Thumb2 this flag will
   	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
   config SYS_L2CACHE_OFF
   	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
   #define MV88F78X60 /* for the DDR training bin_hdr code */
   #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
   #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
   /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

Quoted 7 lines

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

Quoted 4 lines

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

#7 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 54 lines · Pali Rohár
Quoted 53 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 48 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
    	   density. For ARM architectures that support Thumb2 this flag will
    	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
    config SYS_L2CACHE_OFF
    	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
    #define MV88F78X60 /* for the DDR training bin_hdr code */
    #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
    #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
    /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

Quoted 8 lines
Quoted 4 lines

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

I agree -- I think your proposal to make this non-user-configurable is changing the behavior, see:

Before -- you could comment the entry in include/configs/board.h out to deselect an option. After -- you can flip Kconfig switch to deselect an option.

#8 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 60 lines · On Tuesday 09 August 2022 13:38:32 Marek Vasut wrote:
Quoted 59 lines · Pali Rohár
Quoted 57 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 41 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
    	   density. For ARM architectures that support Thumb2 this flag will
    	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
    config SYS_L2CACHE_OFF
    	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
    #define MV88F78X60 /* for the DDR training bin_hdr code */
    #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 28

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
    #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
    /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

Quoted 7 lines

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Quoted 6 lines
Quoted 3 lines

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

I agree -- I think your proposal to make this non-user-configurable is changing the behavior, see:

Are you joking here? Seems that missed the point.

Quoted 2 lines

Before -- you could comment the entry in include/configs/board.h out to deselect an option.

Is there such board? No - for obvious reason.

Sorry, I'm not going to continue in this sausage discussion anymore.

#9 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

In reply to Marek Vasut
Quoted 64 lines · On Tue, 9 Aug 2022 13:38:32 +0200 Marek Vasut <[email protected]> wrote:
Quoted 54 lines · Pali Rohár
Quoted 53 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 48 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
    	   density. For ARM architectures that support Thumb2 this flag will
    	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
    config SYS_L2CACHE_OFF
    	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
    #define MV88F78X60 /* for the DDR training bin_hdr code */
    #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 28

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
    #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
    /* Needed for SPI NOR booting in SPL */  

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

Quoted 8 lines
Quoted 4 lines

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

Quoted 6 lines

I agree -- I think your proposal to make this non-user-configurable is changing the behavior, see:

Before -- you could comment the entry in include/configs/board.h out to deselect an option.
After -- you can flip Kconfig switch to deselect an option.

I don't think we should consider changing sources as something that end-user should be expected to do if they want to enable/disable something.

Marek

#10 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 10 lines · On Tue, 9 Aug 2022 15:16:35 +0200 Marek Behún <[email protected]> wrote:
Quoted 6 lines

I agree -- I think your proposal to make this non-user-configurable is changing the behavior, see:

Before -- you could comment the entry in include/configs/board.h out to deselect an option.
After -- you can flip Kconfig switch to deselect an option.

I don't think we should consider changing sources as something that end-user should be expected to do if they want to enable/disable something.

If we do, we can also have, if we use "select" instead of "default y on MVEBU":

Before -- you could comment the entry in include/configs/board.h out to deselect an option.
After -- you can comment the select in Kconfig :)

Marek

#11 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

In reply to Pali Rohár
Quoted 10 lines · Pali Rohár
Quoted 9 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 5 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 4 lines · Pali Rohár
Quoted 3 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

arch/arm/Kconfig config TPL_SYS_THUMB_BUILD · line 491

Quoted 9 lines
arch/arm/Kconfig +2 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
   	   density. For ARM architectures that support Thumb2 this flag will
   	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"

This needs a depends on !SYS_L2CACHE_OFF.

Quoted 35 lines
Quoted 35 lines
Quoted 34 lines
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
arch/arm/Kconfig +2 -0
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
   config SYS_L2CACHE_OFF
   	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
   #define MV88F78X60 /* for the DDR training bin_hdr code */
   #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
   #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
   /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

Quoted 8 lines
Quoted 4 lines

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

It's tricky to say when to "select" or just "default y if .." or "imply" a given option. It's not only a matter of "can you disable X and the system is functional" but "would you normally want to". There are certainly system bring-up cases and similar where you want to disable L2CC because you're tracking down something. But it's really a feature of the chip and expected to work and something we want enabled, and the scope of when it would be disabled is very very narrow. Looking back at the patch itself, the config.h files that enabled this are almost all a SoC-common file (ti_am335x_common.h should have been setting this I bet, something else for the TODO pile for me), so my thought is that it should be a select'd option, but if there's strong opinion that it's useful to make it easy to turn off when needed, imply'd instead by the various ARCH's in question instead.

That said, thinking about the missing dependency I listed above, that's how to disable L2 when needed, so perhaps select SYS_L2_PL310 if !SYS_L2CACHE_OFF under the various ARCH's is the right way.

Signature · 1 line
Tom
#12 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 81 lines · Tom Rini
Quoted 10 lines · Pali Rohár
Quoted 9 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 5 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 4 lines · Pali Rohár
Quoted 3 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

arch/arm/Kconfig config TPL_SYS_THUMB_BUILD · line 491

Quoted 9 lines
arch/arm/Kconfig +2 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
    	   density. For ARM architectures that support Thumb2 this flag will
    	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"

This needs a depends on !SYS_L2CACHE_OFF.

Quoted 35 lines
Quoted 35 lines
Quoted 34 lines
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
arch/arm/Kconfig +2 -0
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
    config SYS_L2CACHE_OFF
    	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
    #define MV88F78X60 /* for the DDR training bin_hdr code */
    #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 28

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
    #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
    /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

Quoted 8 lines
Quoted 4 lines

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

It's tricky to say when to "select" or just "default y if .." or "imply" a given option. It's not only a matter of "can you disable X and the system is functional" but "would you normally want to". There are certainly system bring-up cases and similar where you want to disable L2CC because you're tracking down something. But it's really a feature of the chip and expected to work and something we want enabled, and the scope of when it would be disabled is very very narrow. Looking back at the patch itself, the config.h files that enabled this are almost all a SoC-common file (ti_am335x_common.h should have been setting this I bet, something else for the TODO pile for me), so my thought is that it should be a select'd option, but if there's strong opinion that it's useful to make it easy to turn off when needed, imply'd instead by the various ARCH's in question instead.

Quoted 3 lines

That said, thinking about the missing dependency I listed above, that's how to disable L2 when needed, so perhaps select SYS_L2_PL310 if !SYS_L2CACHE_OFF under the various ARCH's is the right way.

Uh, I didn't realize we also had this SYS_L2CACHE_OFF .

In that case, the SYS_L2_PL310 selects the L2CC driver to be compiled in and that should likely be per-arch select indeed. And then SYS_L2CACHE_OFF should be 'default' or 'imply', so the user can configure it for the various hardware bring up cases ?

[...]

#13 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Quoted 82 lines · Marek Vasut
Quoted 81 lines · Tom Rini
Quoted 10 lines · Pali Rohár
Quoted 9 lines · On Tuesday 09 August 2022 13:27:38 Marek Vasut wrote:

On 8/9/22 13:21, Pali Rohár wrote:

(reducing the CC list)

Quoted 5 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 4 lines · Pali Rohár
Quoted 3 lines · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
Quoted 1 line

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

arch/arm/Kconfig config TPL_SYS_THUMB_BUILD · line 491

Quoted 9 lines
arch/arm/Kconfig +2 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
    	   density. For ARM architectures that support Thumb2 this flag will
    	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"

This needs a depends on !SYS_L2CACHE_OFF.

Quoted 35 lines
Quoted 35 lines
Quoted 34 lines
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
arch/arm/Kconfig +2 -0
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
    config SYS_L2CACHE_OFF
    	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
    #define MV88F78X60 /* for the DDR training bin_hdr code */
    #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 28

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
    #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
    /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

Quoted 8 lines
Quoted 4 lines

So why should the user be unable to deselect L2CC support on MVEBU ? I can very well disable L2CC support on MX6 and the platform works without it just fine. Maybe the MVEBU needs to be fixed to support the same instead ?

Well, I'm not sure, currently it is non-deselectable option. Maybe it is a bug... but at least change which is doing kconfig conversion should not change behavior.

It's tricky to say when to "select" or just "default y if .." or "imply" a given option. It's not only a matter of "can you disable X and the system is functional" but "would you normally want to". There are certainly system bring-up cases and similar where you want to disable L2CC because you're tracking down something. But it's really a feature of the chip and expected to work and something we want enabled, and the scope of when it would be disabled is very very narrow. Looking back at the patch itself, the config.h files that enabled this are almost all a SoC-common file (ti_am335x_common.h should have been setting this I bet, something else for the TODO pile for me), so my thought is that it should be a select'd option, but if there's strong opinion that it's useful to make it easy to turn off when needed, imply'd instead by the various ARCH's in question instead.

Quoted 5 lines
Quoted 3 lines

That said, thinking about the missing dependency I listed above, that's how to disable L2 when needed, so perhaps select SYS_L2_PL310 if !SYS_L2CACHE_OFF under the various ARCH's is the right way.

Uh, I didn't realize we also had this SYS_L2CACHE_OFF .

Yeah, and it's also one of the odd "Enable this to turn oFF ..." options, but I think in this case, that makes the most sense. Note that SYS_L2CACHE_OFF defaults to 'n' so do assume we have an L2 cache, and also the option is ARM-specific.

Quoted 4 lines

In that case, the SYS_L2_PL310 selects the L2CC driver to be compiled in and that should likely be per-arch select indeed. And then SYS_L2CACHE_OFF should be 'default' or 'imply', so the user can configure it for the various hardware bring up cases ?

Yeah, I think we're in agreement here.

Signature · 1 line
Tom
#14 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

On 8/9/22 18:36, Tom Rini wrote:

[...]

Quoted 25 lines
Quoted 14 lines
Quoted 14 lines

It's tricky to say when to "select" or just "default y if .." or "imply" a given option. It's not only a matter of "can you disable X and the system is functional" but "would you normally want to". There are certainly system bring-up cases and similar where you want to disable L2CC because you're tracking down something. But it's really a feature of the chip and expected to work and something we want enabled, and the scope of when it would be disabled is very very narrow. Looking back at the patch itself, the config.h files that enabled this are almost all a SoC-common file (ti_am335x_common.h should have been setting this I bet, something else for the TODO pile for me), so my thought is that it should be a select'd option, but if there's strong opinion that it's useful to make it easy to turn off when needed, imply'd instead by the various ARCH's in question instead.

Quoted 5 lines
Quoted 3 lines

That said, thinking about the missing dependency I listed above, that's how to disable L2 when needed, so perhaps select SYS_L2_PL310 if !SYS_L2CACHE_OFF under the various ARCH's is the right way.

Uh, I didn't realize we also had this SYS_L2CACHE_OFF .

Yeah, and it's also one of the odd "Enable this to turn oFF ..." options, but I think in this case, that makes the most sense. Note that SYS_L2CACHE_OFF defaults to 'n' so do assume we have an L2 cache, and also the option is ARM-specific.

Quoted 6 lines
Quoted 4 lines

In that case, the SYS_L2_PL310 selects the L2CC driver to be compiled in and that should likely be per-arch select indeed. And then SYS_L2CACHE_OFF should be 'default' or 'imply', so the user can configure it for the various hardware bring up cases ?

Yeah, I think we're in agreement here.

Yes

#15 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Hi,

following the whole discussion I figured using 'select SYS_l2_PL310 if !SYS_L2CACHE_OFF' is the preferred solution.

Now the thing is, if I'd put this line under the ARCH_XXX Kconfig entries, I would change behavior for many boards. Take, for example, ARCH_MVEBU:

grep -lr ARCH_MVEBU configs | ./tools/moveconfig.py -d- CONFIG_SYS_L2_PL310

Tells me that there are 30 ARCH_MVEBU defconfigs, of which 19 use CONFIG_SYS_L2_PL310 and 11 don't. Those 11 boards not using it also do not define CONFIG_SYS_L2CACHE_OFF. So using a 'select SYS_L2_PL310' under ARCH_MVEBU would change behavior for those 11 boards.

There is a similar picture for other architectures, like SOCFPGA or OMAP2. The only place where selecting based on CONFIG_ARCH does not change behavior is ARCH_MX6, when excluding CONFIG_MX6UL(L).

If I didn't miss something here, there's no easy way out. Maybe to define SYS_L2CACHE_OFF for respective boards would be an option, but I don't know if there would be side effects.

Any other suggestions?

Best regards,
Philip

#16 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

Just for the record: I solved the problem using

./tools/moveconfig.py -i CONFIG_SYS_L2_PL310

Patch V4 coming soon.

Quoted 32 lines · Philip Oberfichtner

Hi,

following the whole discussion I figured using 'select SYS_l2_PL310 if
!SYS_L2CACHE_OFF' is the preferred solution.

Now the thing is, if I'd put this line under the ARCH_XXX Kconfig entries, I would change behavior for many boards. Take, for example, ARCH_MVEBU:

grep -lr ARCH_MVEBU configs | ./tools/moveconfig.py -d- CONFIG_SYS_L2_PL310

Tells me that there are 30 ARCH_MVEBU defconfigs, of which 19 use CONFIG_SYS_L2_PL310 and 11 don't. Those 11 boards not using it also do
not define CONFIG_SYS_L2CACHE_OFF. So using a 'select SYS_L2_PL310' under ARCH_MVEBU would change behavior for those 11 boards.

There is a similar picture for other architectures, like SOCFPGA or OMAP2. The only place where selecting based on CONFIG_ARCH does not change behavior is ARCH_MX6, when excluding CONFIG_MX6UL(L).

If I didn't miss something here, there's no easy way out. Maybe to define SYS_L2CACHE_OFF for respective boards would be an option, but I
don't know if there would be side effects.

Any other suggestions?

Best regards,
Philip

#17 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

In reply to Pali Rohár
Quoted 41 lines · Pali Rohár
Quoted 35 lines · On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
Quoted 25 lines · Pali Rohár
Quoted 1 line · On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:

This converts CONFIG_SYS_L2_PL310 to Kconfig.

...

Quoted 22 lines
arch/arm/Kconfig +4 -0
index 949ebb46ba..dde06bdd96 100644
@@ -488,6 +488,10 @@ config TPL_SYS_THUMB_BUILD
  	   density. For ARM architectures that support Thumb2 this flag will
  	   result in Thumb2 code generated by GCC.
+config SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller"
+	help
+	  Enable support for ARM PL310 L2 cache controller in U-Boot
  config SYS_L2CACHE_OFF
  	bool "L2cache off"
arch/arm/mach-mvebu/include/mach/config.h +0 -2
index 4add0d9e10..0bba0a4cf9 100644
@@ -25,8 +25,6 @@
  #define MV88F78X60 /* for the DDR training bin_hdr code */
  #endif
-#define CONFIG_SYS_L2_PL310
-
Quoted 8 lines

arch/arm/mach-mvebu/include/mach/config.h line 30

Quoted 2 lines
arch/arm/mach-mvebu/include/mach/config.h +0 -0
  #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
  /* Needed for SPI NOR booting in SPL */

This option is required for mvebu SoC and is not user (de)-selectable. So please do not define it in each individual mvebu board. It would make it harder to introduce a new mvebu board into U-Boot. Instead enable it for mvebu SoCs like it was before this change. It can be done e.g. by "select" Kconfig keyword in mvebu Kconfig file.

Quoted 1 line

Should it rather be 'default y if MVEBU' in that new PL310 Kconfig option ?

No, because this is just default value of this option and still allows end-user to de-select this option.

Quoted 7 lines

"select" is IIRC the only way how to force Kconfig to always enable some symbol without any option for end-user to disable it.

At least I do not know a way how CONFIG_SYS_L2_PL310 symbol could decide that it is required for CONFIG_MVEBU. Just symbol CONFIG_MVEBU can decide that it requires CONFIG_SYS_L2_PL310 symbol (and not in opposite direction).

That's correct. If this really is to be controlled from PL310 Kconfig file, one could introduce a hidden (i.e., no prompt) symbol depending on CONFIG_MVEBU and selecting CONFIG_SYS_L2_PL310. Something like this might also work:

| config MVEBU_REQUIRE_SYS_L2_PL310
| select SYS_L2_PL310 if MVEBU

Cheers, Phil

#18 lore raw

Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig

In reply to Philip Oberfichtner
Quoted 3 lines · Philip Oberfichtner

This converts CONFIG_SYS_L2_PL310 to Kconfig.

We used common includes before to select L2_PL31, e.g. for tbs2910 (and many more similar boards) we had mx6_common.h .
Now with this conversion lots of individual defconfig files are touched, which creates a very big diffstat.

Please use Kconfig defaults for all architectures that used a common include file before, this avoids this defconfig bloat and is much cleaner since the L2 is for sure not board specific.

Thanks,
Soeren

Quoted 129 lines

---

Changes in v3:
new

  README                                    | 2 --
  arch/arm/Kconfig                          | 4 ++++
  arch/arm/mach-mvebu/include/mach/config.h | 2 --
  configs/am43xx_evm_defconfig              | 1 +
  configs/am43xx_evm_qspiboot_defconfig     | 1 +
  configs/am43xx_evm_rtconly_defconfig      | 1 +
  configs/am43xx_evm_usbhost_boot_defconfig | 1 +
  configs/am43xx_hs_evm_defconfig           | 1 +
  configs/am43xx_hs_evm_qspi_defconfig      | 1 +
  configs/apalis_imx6_defconfig             | 1 +
  configs/aristainetos2c_defconfig          | 1 +
  configs/aristainetos2ccslb_defconfig      | 1 +
  configs/clearfog_defconfig                | 1 +
  configs/cm_fx6_defconfig                  | 1 +
  configs/cm_t43_defconfig                  | 1 +
  configs/colibri_imx6_defconfig            | 1 +
  configs/controlcenterdc_defconfig         | 1 +
  configs/crs305-1g-4s-bit_defconfig        | 1 +
  configs/crs305-1g-4s_defconfig            | 1 +
  configs/crs326-24g-2s-bit_defconfig       | 1 +
  configs/crs326-24g-2s_defconfig           | 1 +
  configs/crs328-4c-20s-4s-bit_defconfig    | 1 +
  configs/crs328-4c-20s-4s_defconfig        | 1 +
  configs/db-88f6720_defconfig              | 1 +
  configs/db-88f6820-amc_defconfig          | 1 +
  configs/db-88f6820-gp_defconfig           | 1 +
  configs/db-mv784mp-gp_defconfig           | 1 +
  configs/db-xc3-24g4xg_defconfig           | 1 +
  configs/dh_imx6_defconfig                 | 1 +
  configs/display5_defconfig                | 1 +
  configs/display5_factory_defconfig        | 1 +
  configs/ds414_defconfig                   | 1 +
  configs/ge_b1x5v2_defconfig               | 1 +
  configs/ge_bx50v3_defconfig               | 1 +
  configs/gwventana_emmc_defconfig          | 1 +
  configs/gwventana_gw5904_defconfig        | 1 +
  configs/gwventana_nand_defconfig          | 1 +
  configs/helios4_defconfig                 | 1 +
  configs/imx6dl_icore_nand_defconfig       | 1 +
  configs/imx6dl_mamoj_defconfig            | 1 +
  configs/imx6q_bosch_acc_defconfig         | 1 +
  configs/imx6q_icore_nand_defconfig        | 1 +
  configs/imx6q_logic_defconfig             | 1 +
  configs/imx6qdl_icore_mipi_defconfig      | 1 +
  configs/imx6qdl_icore_mmc_defconfig       | 1 +
  configs/imx6qdl_icore_nand_defconfig      | 1 +
  configs/imx6qdl_icore_rqs_defconfig       | 1 +
  configs/kp_imx6q_tpc_defconfig            | 1 +
  configs/marsboard_defconfig               | 1 +
  configs/maxbcm_defconfig                  | 1 +
  configs/mccmon6_nor_defconfig             | 1 +
  configs/mccmon6_sd_defconfig              | 1 +
  configs/mx6cuboxi_defconfig               | 1 +
  configs/mx6memcal_defconfig               | 1 +
  configs/mx6qsabrelite_defconfig           | 1 +
  configs/mx6sabreauto_defconfig            | 1 +
  configs/mx6sabresd_defconfig              | 1 +
  configs/mx6slevk_defconfig                | 1 +
  configs/mx6slevk_spinor_defconfig         | 1 +
  configs/mx6slevk_spl_defconfig            | 1 +
  configs/mx6sllevk_defconfig               | 1 +
  configs/mx6sllevk_plugin_defconfig        | 1 +
  configs/mx6sxsabreauto_defconfig          | 1 +
  configs/mx6sxsabresd_defconfig            | 1 +
  configs/nitrogen6dl2g_defconfig           | 1 +
  configs/nitrogen6dl_defconfig             | 1 +
  configs/nitrogen6q2g_defconfig            | 1 +
  configs/nitrogen6q_defconfig              | 1 +
  configs/nitrogen6s1g_defconfig            | 1 +
  configs/nitrogen6s_defconfig              | 1 +
  configs/novena_defconfig                  | 1 +
  configs/omap4_panda_defconfig             | 1 +
  configs/omap4_sdp4430_defconfig           | 1 +
  configs/pcm058_defconfig                  | 1 +
  configs/pico-imx6_defconfig               | 1 +
  configs/poleg_evb_defconfig               | 1 +
  configs/riotboard_defconfig               | 1 +
  configs/socfpga_arria10_defconfig         | 1 +
  configs/socfpga_arria5_defconfig          | 1 +
  configs/socfpga_chameleonv3_defconfig     | 1 +
  configs/socfpga_cyclone5_defconfig        | 1 +
  configs/socfpga_dbm_soc1_defconfig        | 1 +
  configs/socfpga_de0_nano_soc_defconfig    | 1 +
  configs/socfpga_de10_nano_defconfig       | 1 +
  configs/socfpga_de10_standard_defconfig   | 1 +
  configs/socfpga_de1_soc_defconfig         | 1 +
  configs/socfpga_is1_defconfig             | 1 +
  configs/socfpga_mcvevk_defconfig          | 1 +
  configs/socfpga_secu1_defconfig           | 1 +
  configs/socfpga_sockit_defconfig          | 1 +
  configs/socfpga_socrates_defconfig        | 1 +
  configs/socfpga_sr1500_defconfig          | 1 +
  configs/socfpga_vining_fpga_defconfig     | 1 +
  configs/stemmy_defconfig                  | 1 +
  configs/tbs2910_defconfig                 | 1 +
  configs/theadorable_debug_defconfig       | 1 +
  configs/tqma6dl_mba6_mmc_defconfig        | 1 +
  configs/tqma6dl_mba6_spi_defconfig        | 1 +
  configs/tqma6q_mba6_mmc_defconfig         | 1 +
  configs/tqma6q_mba6_spi_defconfig         | 1 +
  configs/tqma6s_mba6_mmc_defconfig         | 1 +
  configs/tqma6s_mba6_spi_defconfig         | 1 +
  configs/turris_omnia_defconfig            | 1 +
  configs/udoo_defconfig                    | 1 +
  configs/udoo_neo_defconfig                | 1 +
  configs/vining_2000_defconfig             | 1 +
  configs/wandboard_defconfig               | 1 +
  configs/warp_defconfig                    | 1 +
  configs/x530_defconfig                    | 1 +
  include/configs/am43xx_evm.h              | 1 -
  include/configs/brppt2.h                  | 1 -
  include/configs/cm_t43.h                  | 1 -
  include/configs/mx6_common.h              | 1 -
  include/configs/odroid.h                  | 1 -
  include/configs/poleg.h                   | 1 -
  include/configs/socfpga_common.h          | 1 -
  include/configs/stemmy.h                  | 1 -
  include/configs/ti_omap4_common.h         | 1 -
  include/configs/trats.h                   | 1 -
  include/configs/trats2.h                  | 1 -
  include/configs/zynq-common.h             | 1 -
  scripts/config_whitelist.txt              | 1 -
  122 files changed, 110 insertions(+), 17 deletions(-)
#19 lore raw

PATCH v3 2/3 ARM: cache: Allow SPL to build cache-pl310.c

In reply to Philip Oberfichtner

Introduce the new Kconfig symbol CONFIG_SPL_SYS_L2_PL310 to allow the SPL to build cache-pl310.c.

Before this commit, the SPL could enable the PL310 L2 cache [1], but the cache maintenance functions from cache-pl310.c were only useable for non-SPL builds.

After enabling the cache one must be able to flush it, too. Thus this commit allows cache-pl310.c to be included in the SPL build.

[1] See for example arch/arm/mach-imx/cache.c: v7_outer_cache_enable()

---

Changes in v3:
- Introduce CONFIG_SPL_SYS_L2_PL310

 arch/arm/Kconfig      | 5 +++++
 arch/arm/lib/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/Kconfig +5 -0
index dde06bdd96..0bc03c921a 100644
@@ -493,6 +493,11 @@ config SYS_L2_PL310
 	help
 	  Enable support for ARM PL310 L2 cache controller in U-Boot
 
+config SPL_SYS_L2_PL310
+	bool "ARM PL310 L2 cache controller in SPL"
+	help
+	  Enable support for ARM PL310 L2 cache controller in SPL
+
 config SYS_L2CACHE_OFF
 	bool "L2cache off"
 	help
arch/arm/lib/Makefile +1 -1
index c603fe61bc..d137b4bf0f 100644
@@ -33,7 +33,6 @@ obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
 obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
-obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 else
 obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
 obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
@@ -46,6 +45,7 @@ else
 obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o
 obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o
 endif
+obj-$(CONFIG_$(SPL_TPL_)SYS_L2_PL310) += cache-pl310.o
 obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += semihosting.o
 
 ifneq ($(filter y,$(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) $(CONFIG_SAVE_PREV_BL_FDT_ADDR)),)
Signature · 1 line
2.37.1
#20 lore raw

PATCH v3 3/3 ARM: imx6: dh-imx6: Enable d-cache early in SPL

In reply to Philip Oberfichtner

From: Marek Vasut <[email protected]>

Enable d-cache early in SPL right after DRAM is started up. This reduces U-Boot proper load time by 650ms when loaded from SPI NOR.

---

Changes in v3:
- Use newly introduced Kconfig symbol for dh_imx6_defconfig

Changes in v2:
- Add comment to explain the relevance of dcache_disable()

 board/dhelectronics/dh_imx6/dh_imx6_spl.c | 28 +++++++++++++++++++++++
 configs/dh_imx6_defconfig                 |  1 +
 2 files changed, 29 insertions(+)
board/dhelectronics/dh_imx6/dh_imx6_spl.c +28 -0
index e49e97724a..4b0e13493d 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
@@ -14,11 +15,13 @@
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/cache.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/io.h>
+#include <asm/system.h>
 #include <errno.h>
 #include <fuse.h>
 #include <fsl_esdhc_imx.h>
@@ -610,6 +613,20 @@ static void dhcom_spl_dram_init(void)
 	}
 }
 
+void dram_bank_mmu_setup(int bank)
+{
+	int i;
+
+	set_section_dcache(ROMCP_ARB_BASE_ADDR >> MMU_SECTION_SHIFT, DCACHE_DEFAULT_OPTION);
+	set_section_dcache(IRAM_BASE_ADDR >> MMU_SECTION_SHIFT, DCACHE_DEFAULT_OPTION);
+
+	for (i = MMDC0_ARB_BASE_ADDR >> MMU_SECTION_SHIFT;
+			i < ((MMDC0_ARB_BASE_ADDR >> MMU_SECTION_SHIFT) +
+			(SZ_1G >> MMU_SECTION_SHIFT));
+			i++)
+		set_section_dcache(i, DCACHE_DEFAULT_OPTION);
+}
+
 void board_init_f(ulong dummy)
 {
 	/* setup AIPS and disable watchdog */
@@ -636,9 +653,20 @@ void board_init_f(ulong dummy)
 	/* DDR3 initialization */
 	dhcom_spl_dram_init();
 
+	/* Set up early MMU tables at the beginning of DRAM and start d-cache */
+	gd->arch.tlb_addr = MMDC0_ARB_BASE_ADDR + SZ_32M;
+	gd->arch.tlb_size = PGTABLE_SIZE;
+	enable_caches();
+
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
 	/* load/boot image from boot device */
 	board_init_r(NULL, 0);
 }
+
+void spl_board_prepare_for_boot(void)
+{
+	/* Flush dcache. Without it U-Boot proper would hang at random locations. */
+	dcache_disable();
+}
configs/dh_imx6_defconfig +1 -0
index 11db9bac2c..e0075e7e87 100644
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SYS_L2_PL310=y
+CONFIG_SPL_SYS_L2_PL310=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SYS_MALLOC_F_LEN=0x1000
Signature · 1 line
2.37.1
#21 lore raw

On 8/9/22 12:07, Philip Oberfichtner wrote:

[...]

board/dhelectronics/dh_imx6/dh_imx6_spl.c void board_init_f(ulong dummy) · line 670

Quoted 3 lines
board/dhelectronics/dh_imx6/dh_imx6_spl.c +3 -0
+void spl_board_prepare_for_boot(void)
+{
+	/* Flush dcache. Without it U-Boot proper would hang at random locations. */

Do we know why these random hangs occur ?
I think this really deserves more than a 1-liner comment.

Quoted 1 line
board/dhelectronics/dh_imx6/dh_imx6_spl.c +1 -0
+	dcache_disable();

[...]