All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL
@ 2022-08-09 10:06 Philip Oberfichtner
  2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Philip Oberfichtner @ 2022-08-09 10:06 UTC (permalink / raw)
  To: u-boot
  Cc: Christoph Niedermaier, Stefano Babic, Marek Vasut,
	Philip Oberfichtner, Adam Ford, Anatolij Gustschin,
	Andreas Geisreiter, Andrew F. Davis, Baruch Siach, Bharat Gooty,
	Breno Lima, Chin-Liang See, Chris Packham, Dalon Westergreen,
	Dennis Gilmore, Dinh Nguyen, Dzmitry Sankouski, Eric Bénard,
	Eric Nelson, Fabio Estevam, Francesco Montefoschi,
	Heiko Schocher, Holger Brunck, Huan 'Kitty' Wang,
	Humberto Naves, Ian Ray, Jaehoon Chung, Jagan Teki, Jim Liu,
	Luka Kovacic, Luka Perkov, Lukasz Majewski, Marcel Ziswiler,
	Marek Behún, Mario Six, Markus Niebel, Martyn Welch,
	Matthias Winker, Michal Simek, Niel Fourie, Nikita Kiryanov,
	Otavio Salvador, Pali Rohár, Patrick Delaunay, Pavel Machek,
	Paweł Anikiel, Peng Fan, Phil Sutter, Raffaele RECALCATI,
	Rayagonda Kokatanur, Rick Chen, Rui Miguel Silva, Sean Anderson,
	Silvio Fricke, Simon Glass, Simone CIANNI, Soeren Moch,
	Stanley Chu, Stefan Roese, Stephan Gerhold, Thomas Huth,
	Tim Harvey, Tom Rini, Troy Kisky, Wolfgang Grandegger,
	Wolfgang Wallner, u-boot


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(-)

-- 
2.37.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 10:06 [PATCH v3 0/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
@ 2022-08-09 10:07 ` Philip Oberfichtner
  2022-08-09 10:58   ` Pali Rohár
  2022-08-12  8:39   ` Soeren Moch
  2022-08-09 10:07 ` [PATCH v3 2/3] ARM: cache: Allow SPL to build cache-pl310.c Philip Oberfichtner
  2022-08-09 10:07 ` [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
  2 siblings, 2 replies; 22+ messages in thread
From: Philip Oberfichtner @ 2022-08-09 10:07 UTC (permalink / raw)
  To: u-boot
  Cc: Christoph Niedermaier, Stefano Babic, Marek Vasut,
	Philip Oberfichtner, Adam Ford, Anatolij Gustschin,
	Andreas Geisreiter, Andrew F. Davis, Baruch Siach, Bharat Gooty,
	Breno Lima, Chin-Liang See, Chris Packham, Dalon Westergreen,
	Dennis Gilmore, Dinh Nguyen, Eric Bénard, Eric Nelson,
	Fabio Estevam, Francesco Montefoschi, Heiko Schocher,
	Holger Brunck, Huan 'Kitty' Wang, Humberto Naves,
	Ian Ray, Jaehoon Chung, Jagan Teki, Jim Liu, Luka Kovacic,
	Luka Perkov, Lukasz Majewski, Marcel Ziswiler, Marek Behún,
	Mario Six, Markus Niebel, Martyn Welch, Matthias Winker,
	Michal Simek, Niel Fourie, Nikita Kiryanov, Otavio Salvador,
	Pali Rohár, Patrick Delaunay, Pavel Machek,
	Paweł Anikiel, Peng Fan, Phil Sutter, Raffaele RECALCATI,
	Rayagonda Kokatanur, Rick Chen, Rui Miguel Silva, Silvio Fricke,
	Simon Glass, Simone CIANNI, Soeren Moch, Stanley Chu,
	Stefan Roese, Stephan Gerhold, Thomas Huth, Tim Harvey,
	Troy Kisky, Wolfgang Grandegger, Wolfgang Wallner, u-boot

This converts CONFIG_SYS_L2_PL310 to Kconfig.

Signed-off-by: Philip Oberfichtner <pro@denx.de>
---

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(-)

diff --git a/README b/README
index 623f359072..b4db223ecd 100644
--- a/README
+++ b/README
@@ -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
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 949ebb46ba..dde06bdd96 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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"
diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
index 4add0d9e10..0bba0a4cf9 100644
--- a/arch/arm/mach-mvebu/include/mach/config.h
+++ b/arch/arm/mach-mvebu/include/mach/config.h
@@ -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 */
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 41042ec4ad..bcce083f3f 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -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
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 18be57a2fe..fb70d416be 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -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
diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig
index ff5fbc6676..e5f7128a86 100644
--- a/configs/am43xx_evm_rtconly_defconfig
+++ b/configs/am43xx_evm_rtconly_defconfig
@@ -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
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 5f0cc109d9..088f71477f 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -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
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index bd151fedc8..4578710f25 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -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
diff --git a/configs/am43xx_hs_evm_qspi_defconfig b/configs/am43xx_hs_evm_qspi_defconfig
index ddb49f4980..d5dcdb51ac 100644
--- a/configs/am43xx_hs_evm_qspi_defconfig
+++ b/configs/am43xx_hs_evm_qspi_defconfig
@@ -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
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 2efbc98f92..0564605d9a 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -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
diff --git a/configs/aristainetos2c_defconfig b/configs/aristainetos2c_defconfig
index 26bcb00ff5..0ede558d81 100644
--- a/configs/aristainetos2c_defconfig
+++ b/configs/aristainetos2c_defconfig
@@ -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
diff --git a/configs/aristainetos2ccslb_defconfig b/configs/aristainetos2ccslb_defconfig
index 682903082c..2ca5753afe 100644
--- a/configs/aristainetos2ccslb_defconfig
+++ b/configs/aristainetos2ccslb_defconfig
@@ -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
diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 56dd3afa80..61c938ee77 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -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
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 9bf78788e4..a97c2fbe19 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -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
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index 96fec05012..c1b58fe11e 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -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
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index fbaf11118a..6d6b4606d3 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -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
diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig
index 2fc7ba475a..cabdeb07f7 100644
--- a/configs/controlcenterdc_defconfig
+++ b/configs/controlcenterdc_defconfig
@@ -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
diff --git a/configs/crs305-1g-4s-bit_defconfig b/configs/crs305-1g-4s-bit_defconfig
index 1b46ab4bf9..114b360da6 100644
--- a/configs/crs305-1g-4s-bit_defconfig
+++ b/configs/crs305-1g-4s-bit_defconfig
@@ -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
diff --git a/configs/crs305-1g-4s_defconfig b/configs/crs305-1g-4s_defconfig
index a7a3ffe481..9276a097e6 100644
--- a/configs/crs305-1g-4s_defconfig
+++ b/configs/crs305-1g-4s_defconfig
@@ -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
diff --git a/configs/crs326-24g-2s-bit_defconfig b/configs/crs326-24g-2s-bit_defconfig
index 70f71de6ae..c1fdc7c5c0 100644
--- a/configs/crs326-24g-2s-bit_defconfig
+++ b/configs/crs326-24g-2s-bit_defconfig
@@ -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
diff --git a/configs/crs326-24g-2s_defconfig b/configs/crs326-24g-2s_defconfig
index 5991b62923..ba6de119b7 100644
--- a/configs/crs326-24g-2s_defconfig
+++ b/configs/crs326-24g-2s_defconfig
@@ -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
diff --git a/configs/crs328-4c-20s-4s-bit_defconfig b/configs/crs328-4c-20s-4s-bit_defconfig
index 434e9fb90f..83be855f2c 100644
--- a/configs/crs328-4c-20s-4s-bit_defconfig
+++ b/configs/crs328-4c-20s-4s-bit_defconfig
@@ -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
diff --git a/configs/crs328-4c-20s-4s_defconfig b/configs/crs328-4c-20s-4s_defconfig
index 8e08cceaac..3379d34bdd 100644
--- a/configs/crs328-4c-20s-4s_defconfig
+++ b/configs/crs328-4c-20s-4s_defconfig
@@ -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
diff --git a/configs/db-88f6720_defconfig b/configs/db-88f6720_defconfig
index c08203e030..57dadaf5dd 100644
--- a/configs/db-88f6720_defconfig
+++ b/configs/db-88f6720_defconfig
@@ -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
diff --git a/configs/db-88f6820-amc_defconfig b/configs/db-88f6820-amc_defconfig
index 07e0b1b6f4..528d65d241 100644
--- a/configs/db-88f6820-amc_defconfig
+++ b/configs/db-88f6820-amc_defconfig
@@ -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
diff --git a/configs/db-88f6820-gp_defconfig b/configs/db-88f6820-gp_defconfig
index 390f229e58..870b4ba522 100644
--- a/configs/db-88f6820-gp_defconfig
+++ b/configs/db-88f6820-gp_defconfig
@@ -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
diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig
index 55efa37328..5dbaee1e52 100644
--- a/configs/db-mv784mp-gp_defconfig
+++ b/configs/db-mv784mp-gp_defconfig
@@ -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
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index 995835a96b..e1e36ffa2a 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_defconfig
@@ -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
diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig
index 051816f719..11db9bac2c 100644
--- a/configs/dh_imx6_defconfig
+++ b/configs/dh_imx6_defconfig
@@ -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
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index f586596ee9..44647e42dd 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -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
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index e2f35a9790..3c5a43b0e8 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -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
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 7af7bb4e98..aeb022bc39 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -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
diff --git a/configs/ge_b1x5v2_defconfig b/configs/ge_b1x5v2_defconfig
index c282990aa4..0437319fa0 100644
--- a/configs/ge_b1x5v2_defconfig
+++ b/configs/ge_b1x5v2_defconfig
@@ -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
diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig
index c332878126..dc83c4a9e4 100644
--- a/configs/ge_bx50v3_defconfig
+++ b/configs/ge_bx50v3_defconfig
@@ -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
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index 0516176e6d..31b1723194 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -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
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 63c87f17a5..79dae2da87 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -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
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index 9d6819f19d..a896c39273 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -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
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
index f15a8e1d02..11cd68ecf6 100644
--- a/configs/helios4_defconfig
+++ b/configs/helios4_defconfig
@@ -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
diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig
index 71e3d39597..b06dbc2286 100644
--- a/configs/imx6dl_icore_nand_defconfig
+++ b/configs/imx6dl_icore_nand_defconfig
@@ -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
diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
index 067498d80e..5854945f40 100644
--- a/configs/imx6dl_mamoj_defconfig
+++ b/configs/imx6dl_mamoj_defconfig
@@ -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
diff --git a/configs/imx6q_bosch_acc_defconfig b/configs/imx6q_bosch_acc_defconfig
index a2501ebc1a..f6bc3d1a83 100644
--- a/configs/imx6q_bosch_acc_defconfig
+++ b/configs/imx6q_bosch_acc_defconfig
@@ -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
diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig
index bf5f620ad8..709008f757 100644
--- a/configs/imx6q_icore_nand_defconfig
+++ b/configs/imx6q_icore_nand_defconfig
@@ -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
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index 1510d10dc5..b0f7415f24 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -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
diff --git a/configs/imx6qdl_icore_mipi_defconfig b/configs/imx6qdl_icore_mipi_defconfig
index bddc4ff98e..ba488ac417 100644
--- a/configs/imx6qdl_icore_mipi_defconfig
+++ b/configs/imx6qdl_icore_mipi_defconfig
@@ -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
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index f8194a002a..c929ca6950 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -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
diff --git a/configs/imx6qdl_icore_nand_defconfig b/configs/imx6qdl_icore_nand_defconfig
index bf5f620ad8..709008f757 100644
--- a/configs/imx6qdl_icore_nand_defconfig
+++ b/configs/imx6qdl_icore_nand_defconfig
@@ -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
diff --git a/configs/imx6qdl_icore_rqs_defconfig b/configs/imx6qdl_icore_rqs_defconfig
index cb2b0df98b..e75075188b 100644
--- a/configs/imx6qdl_icore_rqs_defconfig
+++ b/configs/imx6qdl_icore_rqs_defconfig
@@ -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
diff --git a/configs/kp_imx6q_tpc_defconfig b/configs/kp_imx6q_tpc_defconfig
index 8c5010d605..ababf6225c 100644
--- a/configs/kp_imx6q_tpc_defconfig
+++ b/configs/kp_imx6q_tpc_defconfig
@@ -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
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index c7212ebcd3..c6bd79401e 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -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
diff --git a/configs/maxbcm_defconfig b/configs/maxbcm_defconfig
index 35005fcc35..fd141965e2 100644
--- a/configs/maxbcm_defconfig
+++ b/configs/maxbcm_defconfig
@@ -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
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 80b59cbb05..45de04a8c6 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -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
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index 6984256a1c..593887d387 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -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
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 1f15287369..99d6e37d76 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -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
diff --git a/configs/mx6memcal_defconfig b/configs/mx6memcal_defconfig
index 021e8a6151..3473a4287d 100644
--- a/configs/mx6memcal_defconfig
+++ b/configs/mx6memcal_defconfig
@@ -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
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index fa2c280a8d..44b0e91648 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -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
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index d9d429b4f9..4b2576c4cd 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -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
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index ea0c764674..d2c76a97aa 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -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
diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index 34f9b06dee..dcdcef4bd9 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -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
diff --git a/configs/mx6slevk_spinor_defconfig b/configs/mx6slevk_spinor_defconfig
index 5e54fd3eac..22959591a4 100644
--- a/configs/mx6slevk_spinor_defconfig
+++ b/configs/mx6slevk_spinor_defconfig
@@ -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
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index c05c33d0df..c769f45934 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -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
diff --git a/configs/mx6sllevk_defconfig b/configs/mx6sllevk_defconfig
index ec6843e574..7cf4f6489b 100644
--- a/configs/mx6sllevk_defconfig
+++ b/configs/mx6sllevk_defconfig
@@ -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
diff --git a/configs/mx6sllevk_plugin_defconfig b/configs/mx6sllevk_plugin_defconfig
index bd44298cb2..57f11f7e5e 100644
--- a/configs/mx6sllevk_plugin_defconfig
+++ b/configs/mx6sllevk_plugin_defconfig
@@ -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
diff --git a/configs/mx6sxsabreauto_defconfig b/configs/mx6sxsabreauto_defconfig
index d32ea1ea3c..1a973a23ea 100644
--- a/configs/mx6sxsabreauto_defconfig
+++ b/configs/mx6sxsabreauto_defconfig
@@ -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
diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
index 1985ff96de..979d0982fe 100644
--- a/configs/mx6sxsabresd_defconfig
+++ b/configs/mx6sxsabresd_defconfig
@@ -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
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index 2d653d4d0d..8cbf2f891c 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -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
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index 282fea4508..fb5c9fa04b 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -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
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index ec75ead6e2..b75cc42a13 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -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
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index 1b999ecc9c..99a6a9592c 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -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
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index 60edd7d6e3..3e230fb9d3 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -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
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index 7d1da4cf6b..e70100240e 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -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
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index d4ab93850c..3de1cd5a7c 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -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
diff --git a/configs/omap4_panda_defconfig b/configs/omap4_panda_defconfig
index bd6c2ce4ca..899ba50a16 100644
--- a/configs/omap4_panda_defconfig
+++ b/configs/omap4_panda_defconfig
@@ -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"
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index 62eb75d1f9..82cfc4ab1a 100644
--- a/configs/omap4_sdp4430_defconfig
+++ b/configs/omap4_sdp4430_defconfig
@@ -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
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 132942bf55..3ea87ef133 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -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
diff --git a/configs/pico-imx6_defconfig b/configs/pico-imx6_defconfig
index 086b3ee3ab..84a9b03bd3 100644
--- a/configs/pico-imx6_defconfig
+++ b/configs/pico-imx6_defconfig
@@ -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
diff --git a/configs/poleg_evb_defconfig b/configs/poleg_evb_defconfig
index 16f6215148..4669c7fe86 100644
--- a/configs/poleg_evb_defconfig
+++ b/configs/poleg_evb_defconfig
@@ -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
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index a2ef6187f8..9cdea61301 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -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
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index c98c106851..716a68a67b 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -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
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 24c21090b1..810604ec03 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -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
diff --git a/configs/socfpga_chameleonv3_defconfig b/configs/socfpga_chameleonv3_defconfig
index e78d3b51de..80a965c7e2 100644
--- a/configs/socfpga_chameleonv3_defconfig
+++ b/configs/socfpga_chameleonv3_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x4400
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index d010b54240..7383fa1d3e 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -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
diff --git a/configs/socfpga_dbm_soc1_defconfig b/configs/socfpga_dbm_soc1_defconfig
index a1574b6a5d..9f1bed2b75 100644
--- a/configs/socfpga_dbm_soc1_defconfig
+++ b/configs/socfpga_dbm_soc1_defconfig
@@ -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
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index ec7355d2cc..8e4154f46c 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -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
diff --git a/configs/socfpga_de10_nano_defconfig b/configs/socfpga_de10_nano_defconfig
index b62f029962..713048ab3a 100644
--- a/configs/socfpga_de10_nano_defconfig
+++ b/configs/socfpga_de10_nano_defconfig
@@ -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
diff --git a/configs/socfpga_de10_standard_defconfig b/configs/socfpga_de10_standard_defconfig
index b8bc9da4d0..67b2bafbe8 100644
--- a/configs/socfpga_de10_standard_defconfig
+++ b/configs/socfpga_de10_standard_defconfig
@@ -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
diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig
index 749ec540b4..8bae98e130 100644
--- a/configs/socfpga_de1_soc_defconfig
+++ b/configs/socfpga_de1_soc_defconfig
@@ -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
diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig
index 958adfe25a..b7735689bc 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -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
diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig
index 18e125f5bd..0e47bcd4e7 100644
--- a/configs/socfpga_mcvevk_defconfig
+++ b/configs/socfpga_mcvevk_defconfig
@@ -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
diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig
index 83e24402a8..89df845ad7 100644
--- a/configs/socfpga_secu1_defconfig
+++ b/configs/socfpga_secu1_defconfig
@@ -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
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index 2a02f1dbfa..c16b3e4820 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -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
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 3d0c48d766..7bcea6726b 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -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
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index def2ee8dbc..55388da88c 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -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
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index d0c87416ef..9c89d631f5 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -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
diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig
index 7fc0a39872..f1d3ef5b12 100644
--- a/configs/stemmy_defconfig
+++ b/configs/stemmy_defconfig
@@ -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
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 892d7c60d2..36ef86058a 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -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
diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig
index a1dbc32e54..157641b76f 100644
--- a/configs/theadorable_debug_defconfig
+++ b/configs/theadorable_debug_defconfig
@@ -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
diff --git a/configs/tqma6dl_mba6_mmc_defconfig b/configs/tqma6dl_mba6_mmc_defconfig
index a02ee92785..21b90cb29a 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -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
diff --git a/configs/tqma6dl_mba6_spi_defconfig b/configs/tqma6dl_mba6_spi_defconfig
index 8f7e0ac101..d7e72fdfda 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -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
diff --git a/configs/tqma6q_mba6_mmc_defconfig b/configs/tqma6q_mba6_mmc_defconfig
index 48822f388c..8e30fe7dc4 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -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
diff --git a/configs/tqma6q_mba6_spi_defconfig b/configs/tqma6q_mba6_spi_defconfig
index ed774262ae..30a7813ab3 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -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
diff --git a/configs/tqma6s_mba6_mmc_defconfig b/configs/tqma6s_mba6_mmc_defconfig
index 9400c64812..7e8986c4e4 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -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
diff --git a/configs/tqma6s_mba6_spi_defconfig b/configs/tqma6s_mba6_spi_defconfig
index ddbf9a757e..a8c946a296 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -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
diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig
index ff16825fb4..346b846040 100644
--- a/configs/turris_omnia_defconfig
+++ b/configs/turris_omnia_defconfig
@@ -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
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index a1d2d7f2e4..e03bf9c6f9 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -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
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index e5ba2f3d09..eb488f4fe3 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -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
diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig
index 8d87857ba0..a7211d4e1b 100644
--- a/configs/vining_2000_defconfig
+++ b/configs/vining_2000_defconfig
@@ -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
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 8b0533ce58..52101b7ac9 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -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
diff --git a/configs/warp_defconfig b/configs/warp_defconfig
index 4c9f7051fe..31f0931cac 100644
--- a/configs/warp_defconfig
+++ b/configs/warp_defconfig
@@ -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
diff --git a/configs/x530_defconfig b/configs/x530_defconfig
index c52c9bdb06..7b1c38559a 100644
--- a/configs/x530_defconfig
+++ b/configs/x530_defconfig
@@ -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
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 87d3a27099..fc82a8c003 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -29,7 +29,6 @@
 /* SPL defines. */
 
 /* Enabling L2 Cache */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE	0x48242000
 
 /*
diff --git a/include/configs/brppt2.h b/include/configs/brppt2.h
index adaba410ce..0c7fe5f3ab 100644
--- a/include/configs/brppt2.h
+++ b/include/configs/brppt2.h
@@ -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 */
 
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 07c5cb8ded..50cb2a4718 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -36,7 +36,6 @@
 #define CONFIG_POWER_TPS65218
 
 /* Enabling L2 Cache */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE		0x48242000
 
 /*
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index e416f81e43..4314556754 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -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
 
diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 7448cc9520..babd3ca963 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -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
 
diff --git a/include/configs/poleg.h b/include/configs/poleg.h
index f1c259f476..05253d59ef 100644
--- a/include/configs/poleg.h
+++ b/include/configs/poleg.h
@@ -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
 
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 4a7da76e51..c3f30afe2b 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -48,7 +48,6 @@
 /*
  * Cache
  */
-#define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE		SOCFPGA_MPUL2_ADDRESS
 
 /*
diff --git a/include/configs/stemmy.h b/include/configs/stemmy.h
index 71b25c23b1..3c70856fc7 100644
--- a/include/configs/stemmy.h
+++ b/include/configs/stemmy.h
@@ -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 */
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 3d78972bfe..0568946fc8 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -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
 
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 53f5a6996b..530b413d5b 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -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
 
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index b7449dab8b..06c1fcd23e 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -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
 
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 1fdde90654..6b0589dbe1 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -11,7 +11,6 @@
 
 /* Cache options */
 #ifndef CONFIG_SYS_L2CACHE_OFF
-# define CONFIG_SYS_L2_PL310
 # define CONFIG_SYS_PL310_BASE		0xf8f02000
 #endif
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index fc07c5d257..b1c09ea62b 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v3 2/3] ARM: cache: Allow SPL to build cache-pl310.c
  2022-08-09 10:06 [PATCH v3 0/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
  2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
@ 2022-08-09 10:07 ` Philip Oberfichtner
  2022-08-09 10:07 ` [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
  2 siblings, 0 replies; 22+ messages in thread
From: Philip Oberfichtner @ 2022-08-09 10:07 UTC (permalink / raw)
  To: u-boot
  Cc: Christoph Niedermaier, Stefano Babic, Marek Vasut,
	Philip Oberfichtner, Bharat Gooty, Dzmitry Sankouski,
	Rayagonda Kokatanur, Sean Anderson, Stefan Roese, Tom Rini

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()

Signed-off-by: Philip Oberfichtner <pro@denx.de>
---

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(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index dde06bdd96..0bc03c921a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index c603fe61bc..d137b4bf0f 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -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)),)
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL
  2022-08-09 10:06 [PATCH v3 0/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
  2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
  2022-08-09 10:07 ` [PATCH v3 2/3] ARM: cache: Allow SPL to build cache-pl310.c Philip Oberfichtner
@ 2022-08-09 10:07 ` Philip Oberfichtner
  2022-08-09 11:17   ` Marek Vasut
  2 siblings, 1 reply; 22+ messages in thread
From: Philip Oberfichtner @ 2022-08-09 10:07 UTC (permalink / raw)
  To: u-boot
  Cc: Christoph Niedermaier, Stefano Babic, Marek Vasut,
	Philip Oberfichtner, Andreas Geisreiter, Tom Rini, u-boot

From: Marek Vasut <marex@denx.de>

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.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Philip Oberfichtner <pro@denx.de>

---

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(+)

diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
index e49e97724a..4b0e13493d 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
@@ -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();
+}
diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig
index 11db9bac2c..e0075e7e87 100644
--- a/configs/dh_imx6_defconfig
+++ b/configs/dh_imx6_defconfig
@@ -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
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
@ 2022-08-09 10:58   ` Pali Rohár
  2022-08-09 11:16     ` Marek Vasut
  2022-08-12  8:39   ` Soeren Moch
  1 sibling, 1 reply; 22+ messages in thread
From: Pali Rohár @ 2022-08-09 10:58 UTC (permalink / raw)
  To: Philip Oberfichtner
  Cc: u-boot, Christoph Niedermaier, Stefano Babic, Marek Vasut,
	Adam Ford, Anatolij Gustschin, Andreas Geisreiter,
	Andrew F. Davis, Baruch Siach, Bharat Gooty, Breno Lima,
	Chin-Liang See, Chris Packham, Dalon Westergreen, Dennis Gilmore,
	Dinh Nguyen, Eric Bénard, Eric Nelson, Fabio Estevam,
	Francesco Montefoschi, Heiko Schocher, Holger Brunck,
	Huan 'Kitty' Wang, Humberto Naves, Ian Ray,
	Jaehoon Chung, Jagan Teki, Jim Liu, Luka Kovacic, Luka Perkov,
	Lukasz Majewski, Marcel Ziswiler, Marek Behún, Mario Six,
	Markus Niebel, Martyn Welch, Matthias Winker, Michal Simek,
	Niel Fourie, Nikita Kiryanov, Otavio Salvador, Patrick Delaunay,
	Pavel Machek, Paweł Anikiel, Peng Fan, Phil Sutter,
	Raffaele RECALCATI, Rayagonda Kokatanur, Rick Chen,
	Rui Miguel Silva, Silvio Fricke, Simon Glass, Simone CIANNI,
	Soeren Moch, Stanley Chu, Stefan Roese, Stephan Gerhold,
	Thomas Huth, Tim Harvey, Troy Kisky, Wolfgang Grandegger,
	Wolfgang Wallner, u-boot

On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> This converts CONFIG_SYS_L2_PL310 to Kconfig.
...
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 949ebb46ba..dde06bdd96 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -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"
> diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> index 4add0d9e10..0bba0a4cf9 100644
> --- a/arch/arm/mach-mvebu/include/mach/config.h
> +++ b/arch/arm/mach-mvebu/include/mach/config.h
> @@ -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.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 10:58   ` Pali Rohár
@ 2022-08-09 11:16     ` Marek Vasut
  2022-08-09 11:21       ` Pali Rohár
  0 siblings, 1 reply; 22+ messages in thread
From: Marek Vasut @ 2022-08-09 11:16 UTC (permalink / raw)
  To: Pali Rohár, Philip Oberfichtner
  Cc: u-boot, Christoph Niedermaier, Stefano Babic, Adam Ford,
	Anatolij Gustschin, Andreas Geisreiter, Andrew F. Davis,
	Baruch Siach, Bharat Gooty, Breno Lima, Chin-Liang See,
	Chris Packham, Dalon Westergreen, Dennis Gilmore, Dinh Nguyen,
	Eric Bénard, Eric Nelson, Fabio Estevam,
	Francesco Montefoschi, Heiko Schocher, Holger Brunck,
	Huan 'Kitty' Wang, Humberto Naves, Ian Ray,
	Jaehoon Chung, Jagan Teki, Jim Liu, Luka Kovacic, Luka Perkov,
	Lukasz Majewski, Marcel Ziswiler, Marek Behún, Mario Six,
	Markus Niebel, Martyn Welch, Matthias Winker, Michal Simek,
	Niel Fourie, Nikita Kiryanov, Otavio Salvador, Patrick Delaunay,
	Pavel Machek, Paweł Anikiel, Peng Fan, Phil Sutter,
	Raffaele RECALCATI, Rayagonda Kokatanur, Rick Chen,
	Rui Miguel Silva, Silvio Fricke, Simon Glass, Simone CIANNI,
	Soeren Moch, Stanley Chu, Stefan Roese, Stephan Gerhold,
	Thomas Huth, Tim Harvey, Troy Kisky, Wolfgang Grandegger,
	Wolfgang Wallner, u-boot

On 8/9/22 12:58, Pali Rohár wrote:
> On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
>> This converts CONFIG_SYS_L2_PL310 to Kconfig.
> ...
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index 949ebb46ba..dde06bdd96 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -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"
>> diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
>> index 4add0d9e10..0bba0a4cf9 100644
>> --- a/arch/arm/mach-mvebu/include/mach/config.h
>> +++ b/arch/arm/mach-mvebu/include/mach/config.h
>> @@ -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.

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL
  2022-08-09 10:07 ` [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
@ 2022-08-09 11:17   ` Marek Vasut
  0 siblings, 0 replies; 22+ messages in thread
From: Marek Vasut @ 2022-08-09 11:17 UTC (permalink / raw)
  To: Philip Oberfichtner, u-boot
  Cc: Christoph Niedermaier, Stefano Babic, Andreas Geisreiter,
	Tom Rini, u-boot

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

[...]

> +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.

> +	dcache_disable();

[...]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:16     ` Marek Vasut
@ 2022-08-09 11:21       ` Pali Rohár
  2022-08-09 11:27         ` Marek Vasut
  2022-08-09 14:32         ` Phil Sutter
  0 siblings, 2 replies; 22+ messages in thread
From: Pali Rohár @ 2022-08-09 11:21 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Adam Ford, Anatolij Gustschin, Andreas Geisreiter,
	Andrew F. Davis, Baruch Siach, Bharat Gooty, Breno Lima,
	Chin-Liang See, Chris Packham, Dalon Westergreen, Dennis Gilmore,
	Dinh Nguyen, Eric Bénard, Eric Nelson, Fabio Estevam,
	Francesco Montefoschi, Heiko Schocher, Holger Brunck,
	Huan 'Kitty' Wang, Humberto Naves, Ian Ray,
	Jaehoon Chung, Jagan Teki, Jim Liu, Luka Kovacic, Luka Perkov,
	Lukasz Majewski, Marcel Ziswiler, Marek Behún, Mario Six,
	Markus Niebel, Martyn Welch, Matthias Winker, Michal Simek,
	Niel Fourie, Nikita Kiryanov, Otavio Salvador, Patrick Delaunay,
	Pavel Machek, Paweł Anikiel, Peng Fan, Phil Sutter,
	Raffaele RECALCATI, Rayagonda Kokatanur, Rick Chen,
	Rui Miguel Silva, Silvio Fricke, Simon Glass, Simone CIANNI,
	Soeren Moch, Stanley Chu, Stefan Roese, Stephan Gerhold,
	Thomas Huth, Tim Harvey, Troy Kisky, Wolfgang Grandegger,
	Wolfgang Wallner, u-boot

On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
> On 8/9/22 12:58, Pali Rohár wrote:
> > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> > > This converts CONFIG_SYS_L2_PL310 to Kconfig.
> > ...
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index 949ebb46ba..dde06bdd96 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -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"
> > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> > > index 4add0d9e10..0bba0a4cf9 100644
> > > --- a/arch/arm/mach-mvebu/include/mach/config.h
> > > +++ b/arch/arm/mach-mvebu/include/mach/config.h
> > > @@ -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.
> 
> 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).

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:21       ` Pali Rohár
@ 2022-08-09 11:27         ` Marek Vasut
  2022-08-09 11:32           ` Pali Rohár
  2022-08-09 14:32         ` Phil Sutter
  1 sibling, 1 reply; 22+ messages in thread
From: Marek Vasut @ 2022-08-09 11:27 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

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

(reducing the CC list)

> On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
>> On 8/9/22 12:58, Pali Rohár wrote:
>>> On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
>>>> This converts CONFIG_SYS_L2_PL310 to Kconfig.
>>> ...
>>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>>>> index 949ebb46ba..dde06bdd96 100644
>>>> --- a/arch/arm/Kconfig
>>>> +++ b/arch/arm/Kconfig
>>>> @@ -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"
>>>> diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
>>>> index 4add0d9e10..0bba0a4cf9 100644
>>>> --- a/arch/arm/mach-mvebu/include/mach/config.h
>>>> +++ b/arch/arm/mach-mvebu/include/mach/config.h
>>>> @@ -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.
>>
>> 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).

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 ?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:27         ` Marek Vasut
@ 2022-08-09 11:32           ` Pali Rohár
  2022-08-09 11:38             ` Marek Vasut
  2022-08-09 13:46             ` Tom Rini
  0 siblings, 2 replies; 22+ messages in thread
From: Pali Rohár @ 2022-08-09 11:32 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

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)
> 
> > On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
> > > On 8/9/22 12:58, Pali Rohár wrote:
> > > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> > > > > This converts CONFIG_SYS_L2_PL310 to Kconfig.
> > > > ...
> > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > > index 949ebb46ba..dde06bdd96 100644
> > > > > --- a/arch/arm/Kconfig
> > > > > +++ b/arch/arm/Kconfig
> > > > > @@ -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"
> > > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > index 4add0d9e10..0bba0a4cf9 100644
> > > > > --- a/arch/arm/mach-mvebu/include/mach/config.h
> > > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > @@ -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.
> > > 
> > > 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).
> 
> 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.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:32           ` Pali Rohár
@ 2022-08-09 11:38             ` Marek Vasut
  2022-08-09 12:59               ` Pali Rohár
  2022-08-09 13:16               ` Marek Behún
  2022-08-09 13:46             ` Tom Rini
  1 sibling, 2 replies; 22+ messages in thread
From: Marek Vasut @ 2022-08-09 11:38 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

On 8/9/22 13:32, Pali Rohár wrote:
> 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)
>>
>>> On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
>>>> On 8/9/22 12:58, Pali Rohár wrote:
>>>>> On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
>>>>>> This converts CONFIG_SYS_L2_PL310 to Kconfig.
>>>>> ...
>>>>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>>>>>> index 949ebb46ba..dde06bdd96 100644
>>>>>> --- a/arch/arm/Kconfig
>>>>>> +++ b/arch/arm/Kconfig
>>>>>> @@ -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"
>>>>>> diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
>>>>>> index 4add0d9e10..0bba0a4cf9 100644
>>>>>> --- a/arch/arm/mach-mvebu/include/mach/config.h
>>>>>> +++ b/arch/arm/mach-mvebu/include/mach/config.h
>>>>>> @@ -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.
>>>>
>>>> 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).
>>
>> 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.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:38             ` Marek Vasut
@ 2022-08-09 12:59               ` Pali Rohár
  2022-08-09 13:16               ` Marek Behún
  1 sibling, 0 replies; 22+ messages in thread
From: Pali Rohár @ 2022-08-09 12:59 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

On Tuesday 09 August 2022 13:38:32 Marek Vasut wrote:
> On 8/9/22 13:32, Pali Rohár wrote:
> > 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)
> > > 
> > > > On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
> > > > > On 8/9/22 12:58, Pali Rohár wrote:
> > > > > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> > > > > > > This converts CONFIG_SYS_L2_PL310 to Kconfig.
> > > > > > ...
> > > > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > > > > index 949ebb46ba..dde06bdd96 100644
> > > > > > > --- a/arch/arm/Kconfig
> > > > > > > +++ b/arch/arm/Kconfig
> > > > > > > @@ -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"
> > > > > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > > index 4add0d9e10..0bba0a4cf9 100644
> > > > > > > --- a/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > > @@ -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.
> > > > > 
> > > > > 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).
> > > 
> > > 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:

Are you joking here? Seems that missed the point.

> 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.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:38             ` Marek Vasut
  2022-08-09 12:59               ` Pali Rohár
@ 2022-08-09 13:16               ` Marek Behún
  2022-08-09 13:18                 ` Marek Behún
  1 sibling, 1 reply; 22+ messages in thread
From: Marek Behún @ 2022-08-09 13:16 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Pali Rohár, Philip Oberfichtner, u-boot,
	Christoph Niedermaier, Stefano Babic, Marcel Ziswiler, Peng Fan,
	u-boot

On Tue, 9 Aug 2022 13:38:32 +0200
Marek Vasut <marex@denx.de> wrote:

> On 8/9/22 13:32, Pali Rohár wrote:
> > 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)
> >>  
> >>> On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:  
> >>>> On 8/9/22 12:58, Pali Rohár wrote:  
> >>>>> On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:  
> >>>>>> This converts CONFIG_SYS_L2_PL310 to Kconfig.  
> >>>>> ...  
> >>>>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >>>>>> index 949ebb46ba..dde06bdd96 100644
> >>>>>> --- a/arch/arm/Kconfig
> >>>>>> +++ b/arch/arm/Kconfig
> >>>>>> @@ -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"
> >>>>>> diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> >>>>>> index 4add0d9e10..0bba0a4cf9 100644
> >>>>>> --- a/arch/arm/mach-mvebu/include/mach/config.h
> >>>>>> +++ b/arch/arm/mach-mvebu/include/mach/config.h
> >>>>>> @@ -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.  
> >>>>
> >>>> 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).  
> >>
> >> 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.

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 13:16               ` Marek Behún
@ 2022-08-09 13:18                 ` Marek Behún
  0 siblings, 0 replies; 22+ messages in thread
From: Marek Behún @ 2022-08-09 13:18 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Pali Rohár, Philip Oberfichtner, u-boot,
	Christoph Niedermaier, Stefano Babic, Marcel Ziswiler, Peng Fan,
	u-boot

On Tue, 9 Aug 2022 15:16:35 +0200
Marek Behún <kabel@kernel.org> wrote:

> > 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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:32           ` Pali Rohár
  2022-08-09 11:38             ` Marek Vasut
@ 2022-08-09 13:46             ` Tom Rini
  2022-08-09 16:03               ` Marek Vasut
  1 sibling, 1 reply; 22+ messages in thread
From: Tom Rini @ 2022-08-09 13:46 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Marek Vasut, Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

[-- Attachment #1: Type: text/plain, Size: 4300 bytes --]

On Tue, Aug 09, 2022 at 01:32:24PM +0200, Pali Rohár wrote:
> 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)
> > 
> > > On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
> > > > On 8/9/22 12:58, Pali Rohár wrote:
> > > > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> > > > > > This converts CONFIG_SYS_L2_PL310 to Kconfig.
> > > > > ...
> > > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > > > index 949ebb46ba..dde06bdd96 100644
> > > > > > --- a/arch/arm/Kconfig
> > > > > > +++ b/arch/arm/Kconfig
> > > > > > @@ -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.

> > > > > > +	help
> > > > > > +	  Enable support for ARM PL310 L2 cache controller in U-Boot
> > > > > >    config SYS_L2CACHE_OFF
> > > > > >    	bool "L2cache off"
> > > > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > index 4add0d9e10..0bba0a4cf9 100644
> > > > > > --- a/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > @@ -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.
> > > > 
> > > > 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).
> > 
> > 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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 11:21       ` Pali Rohár
  2022-08-09 11:27         ` Marek Vasut
@ 2022-08-09 14:32         ` Phil Sutter
  1 sibling, 0 replies; 22+ messages in thread
From: Phil Sutter @ 2022-08-09 14:32 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Marek Vasut, Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Adam Ford, Anatolij Gustschin, Andreas Geisreiter,
	Andrew F. Davis, Baruch Siach, Bharat Gooty, Breno Lima,
	Chin-Liang See, Chris Packham, Dalon Westergreen, Dennis Gilmore,
	Dinh Nguyen, Eric Bénard, Eric Nelson, Fabio Estevam,
	Francesco Montefoschi, Heiko Schocher, Holger Brunck,
	Huan 'Kitty' Wang, Humberto Naves, Ian Ray,
	Jaehoon Chung, Jagan Teki, Jim Liu, Luka Kovacic, Luka Perkov,
	Lukasz Majewski, Marcel Ziswiler, Marek Behún, Mario Six,
	Markus Niebel, Martyn Welch, Matthias Winker, Michal Simek,
	Niel Fourie, Nikita Kiryanov, Otavio Salvador, Patrick Delaunay,
	Pavel Machek, Paweł Anikiel, Peng Fan, Raffaele RECALCATI,
	Rayagonda Kokatanur, Rick Chen, Rui Miguel Silva, Silvio Fricke,
	Simon Glass, Simone CIANNI, Soeren Moch, Stanley Chu,
	Stefan Roese, Stephan Gerhold, Thomas Huth, Tim Harvey,
	Troy Kisky, Wolfgang Grandegger, Wolfgang Wallner, u-boot

On Tue, Aug 09, 2022 at 01:21:51PM +0200, Pali Rohár wrote:
> On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
> > On 8/9/22 12:58, Pali Rohár wrote:
> > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> > > > This converts CONFIG_SYS_L2_PL310 to Kconfig.
> > > ...
> > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > index 949ebb46ba..dde06bdd96 100644
> > > > --- a/arch/arm/Kconfig
> > > > +++ b/arch/arm/Kconfig
> > > > @@ -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"
> > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> > > > index 4add0d9e10..0bba0a4cf9 100644
> > > > --- a/arch/arm/mach-mvebu/include/mach/config.h
> > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h
> > > > @@ -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.
> > 
> > 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).

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 13:46             ` Tom Rini
@ 2022-08-09 16:03               ` Marek Vasut
  2022-08-09 16:36                 ` Tom Rini
  0 siblings, 1 reply; 22+ messages in thread
From: Marek Vasut @ 2022-08-09 16:03 UTC (permalink / raw)
  To: Tom Rini, Pali Rohár
  Cc: Philip Oberfichtner, u-boot, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

On 8/9/22 15:46, Tom Rini wrote:
> On Tue, Aug 09, 2022 at 01:32:24PM +0200, Pali Rohár wrote:
>> 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)
>>>
>>>> On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
>>>>> On 8/9/22 12:58, Pali Rohár wrote:
>>>>>> On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
>>>>>>> This converts CONFIG_SYS_L2_PL310 to Kconfig.
>>>>>> ...
>>>>>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>>>>>>> index 949ebb46ba..dde06bdd96 100644
>>>>>>> --- a/arch/arm/Kconfig
>>>>>>> +++ b/arch/arm/Kconfig
>>>>>>> @@ -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.
> 
>>>>>>> +	help
>>>>>>> +	  Enable support for ARM PL310 L2 cache controller in U-Boot
>>>>>>>     config SYS_L2CACHE_OFF
>>>>>>>     	bool "L2cache off"
>>>>>>> diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
>>>>>>> index 4add0d9e10..0bba0a4cf9 100644
>>>>>>> --- a/arch/arm/mach-mvebu/include/mach/config.h
>>>>>>> +++ b/arch/arm/mach-mvebu/include/mach/config.h
>>>>>>> @@ -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.
>>>>>
>>>>> 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).
>>>
>>> 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.

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 ?

[...]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 16:03               ` Marek Vasut
@ 2022-08-09 16:36                 ` Tom Rini
  2022-08-09 18:27                   ` Marek Vasut
  0 siblings, 1 reply; 22+ messages in thread
From: Tom Rini @ 2022-08-09 16:36 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Pali Rohár, Philip Oberfichtner, u-boot,
	Christoph Niedermaier, Stefano Babic, Marcel Ziswiler,
	Marek Behún, Peng Fan, u-boot

[-- Attachment #1: Type: text/plain, Size: 5359 bytes --]

On Tue, Aug 09, 2022 at 06:03:15PM +0200, Marek Vasut wrote:
> On 8/9/22 15:46, Tom Rini wrote:
> > On Tue, Aug 09, 2022 at 01:32:24PM +0200, Pali Rohár wrote:
> > > 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)
> > > > 
> > > > > On Tuesday 09 August 2022 13:16:41 Marek Vasut wrote:
> > > > > > On 8/9/22 12:58, Pali Rohár wrote:
> > > > > > > On Tuesday 09 August 2022 12:07:00 Philip Oberfichtner wrote:
> > > > > > > > This converts CONFIG_SYS_L2_PL310 to Kconfig.
> > > > > > > ...
> > > > > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > > > > > index 949ebb46ba..dde06bdd96 100644
> > > > > > > > --- a/arch/arm/Kconfig
> > > > > > > > +++ b/arch/arm/Kconfig
> > > > > > > > @@ -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.
> > 
> > > > > > > > +	help
> > > > > > > > +	  Enable support for ARM PL310 L2 cache controller in U-Boot
> > > > > > > >     config SYS_L2CACHE_OFF
> > > > > > > >     	bool "L2cache off"
> > > > > > > > diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > > > index 4add0d9e10..0bba0a4cf9 100644
> > > > > > > > --- a/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > > > +++ b/arch/arm/mach-mvebu/include/mach/config.h
> > > > > > > > @@ -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.
> > > > > > 
> > > > > > 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).
> > > > 
> > > > 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.
> 
> 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.

> 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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 16:36                 ` Tom Rini
@ 2022-08-09 18:27                   ` Marek Vasut
  2022-08-11 10:17                     ` Philip Oberfichtner
  0 siblings, 1 reply; 22+ messages in thread
From: Marek Vasut @ 2022-08-09 18:27 UTC (permalink / raw)
  To: Tom Rini
  Cc: Pali Rohár, Philip Oberfichtner, u-boot,
	Christoph Niedermaier, Stefano Babic, Marcel Ziswiler,
	Marek Behún, Peng Fan, u-boot

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

[...]

>>> 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.
>>
>> 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.
> 
>> 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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 18:27                   ` Marek Vasut
@ 2022-08-11 10:17                     ` Philip Oberfichtner
  2022-08-16 14:42                       ` Philip Oberfichtner
  0 siblings, 1 reply; 22+ messages in thread
From: Philip Oberfichtner @ 2022-08-11 10:17 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Tom Rini, Pali Rohár, Christoph Niedermaier,
	Stefano Babic, Marcel Ziswiler, Marek Behún, Peng Fan,
	u-boot

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
  2022-08-09 10:58   ` Pali Rohár
@ 2022-08-12  8:39   ` Soeren Moch
  1 sibling, 0 replies; 22+ messages in thread
From: Soeren Moch @ 2022-08-12  8:39 UTC (permalink / raw)
  To: Philip Oberfichtner, u-boot
  Cc: Christoph Niedermaier, Stefano Babic, Marek Vasut, Adam Ford,
	Anatolij Gustschin, Andreas Geisreiter, Andrew F. Davis,
	Baruch Siach, Bharat Gooty, Breno Lima, Chin-Liang See,
	Chris Packham, Dalon Westergreen, Dennis Gilmore, Dinh Nguyen,
	Eric Bénard, Eric Nelson, Fabio Estevam,
	Francesco Montefoschi, Heiko Schocher, Holger Brunck,
	Huan 'Kitty' Wang, Humberto Naves, Ian Ray,
	Jaehoon Chung, Jagan Teki, Jim Liu, Luka Kovacic, Luka Perkov,
	Lukasz Majewski, Marcel Ziswiler, Marek Behún, Mario Six,
	Markus Niebel, Martyn Welch, Matthias Winker, Michal Simek,
	Niel Fourie, Nikita Kiryanov, Otavio Salvador, Pali Rohár,
	Patrick Delaunay, Pavel Machek, Paweł Anikiel, Peng Fan,
	Phil Sutter, Raffaele RECALCATI, Rayagonda Kokatanur, Rick Chen,
	Rui Miguel Silva, Silvio Fricke, Simon Glass, Simone CIANNI,
	Stanley Chu, Stefan Roese, Stephan Gerhold, Thomas Huth,
	Tim Harvey, Troy Kisky, Wolfgang Grandegger, Wolfgang Wallner,
	u-boot



On 09.08.22 12:07, Philip Oberfichtner wrote:
> This converts CONFIG_SYS_L2_PL310 to Kconfig.
>
> Signed-off-by: Philip Oberfichtner <pro@denx.de>
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
> ---
>
> 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(-)
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig
  2022-08-11 10:17                     ` Philip Oberfichtner
@ 2022-08-16 14:42                       ` Philip Oberfichtner
  0 siblings, 0 replies; 22+ messages in thread
From: Philip Oberfichtner @ 2022-08-16 14:42 UTC (permalink / raw)
  To: u-boot

Just for the record: I solved the problem using

./tools/moveconfig.py -i CONFIG_SYS_L2_PL310

Patch V4 coming soon.


On Thu, 2022-08-11 at 12:17 +0200, Philip Oberfichtner wrote:
> 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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-08-16 14:42 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 10:06 [PATCH v3 0/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
2022-08-09 10:07 ` [PATCH v3 1/3] Convert CONFIG_SYS_L2_PL310 to Kconfig Philip Oberfichtner
2022-08-09 10:58   ` Pali Rohár
2022-08-09 11:16     ` Marek Vasut
2022-08-09 11:21       ` Pali Rohár
2022-08-09 11:27         ` Marek Vasut
2022-08-09 11:32           ` Pali Rohár
2022-08-09 11:38             ` Marek Vasut
2022-08-09 12:59               ` Pali Rohár
2022-08-09 13:16               ` Marek Behún
2022-08-09 13:18                 ` Marek Behún
2022-08-09 13:46             ` Tom Rini
2022-08-09 16:03               ` Marek Vasut
2022-08-09 16:36                 ` Tom Rini
2022-08-09 18:27                   ` Marek Vasut
2022-08-11 10:17                     ` Philip Oberfichtner
2022-08-16 14:42                       ` Philip Oberfichtner
2022-08-09 14:32         ` Phil Sutter
2022-08-12  8:39   ` Soeren Moch
2022-08-09 10:07 ` [PATCH v3 2/3] ARM: cache: Allow SPL to build cache-pl310.c Philip Oberfichtner
2022-08-09 10:07 ` [PATCH v3 3/3] ARM: imx6: dh-imx6: Enable d-cache early in SPL Philip Oberfichtner
2022-08-09 11:17   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.