[PATCH 17/21] Convert CONFIG_SYS_NONCACHED_MEMORY to Kconfig

Tom Rini trini at konsulko.com
Sat Oct 29 02:27:10 CEST 2022


This converts the following to Kconfig:
   CONFIG_SYS_NONCACHED_MEMORY

To do this we introduce CONFIG_SYS_HAS_NONCACHED_MEMORY as a bool to
gate if we are going to have noncached_... functions available and then
continue to use CONFIG_SYS_NONCACHED_MEMORY to store the size of said
cache. We make this new option depend on both the architectures which
implement support and the drivers which make use of it.

Cc: Tom Warren <twarren at nvidia.com>
Cc: Mingming lee <mingming.lee at mediatek.com>
Cc: "Ying-Chun Liu (PaulLiu)" <paul.liu at linaro.org>
Cc: Alban Bedel <alban.bedel at avionic-design.de>
Cc: Stephen Warren <swarren at nvidia.com>
Cc: Marcel Ziswiler <marcel.ziswiler at toradex.com>
Cc: Allen Martin <amartin at nvidia.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
I'm cc'ing a bunch of board maintainers here because restricting the
noncached support to these drivers results in the noncached framework
not being used, but also doesn't change anything else about the binary.
Is there some other use case here I'm missing?
---
 README                                     | 19 -----------------
 arch/Kconfig                               | 24 ++++++++++++++++++++++
 configs/apalis-tk1_defconfig               |  1 +
 configs/apalis_t30_defconfig               |  1 +
 configs/beaver_defconfig                   |  1 +
 configs/cardhu_defconfig                   |  1 +
 configs/cei-tk1-som_defconfig              |  1 +
 configs/colibri_t20_defconfig              |  1 +
 configs/colibri_t30_defconfig              |  1 +
 configs/dalmore_defconfig                  |  1 +
 configs/harmony_defconfig                  |  1 +
 configs/imx8mp_rsb3720a1_4G_defconfig      |  1 +
 configs/imx8mp_rsb3720a1_6G_defconfig      |  1 +
 configs/jetson-tk1_defconfig               |  1 +
 configs/medcom-wide_defconfig              |  1 +
 configs/mt7621_nand_rfb_defconfig          |  1 +
 configs/mt7621_rfb_defconfig               |  1 +
 configs/mt7622_rfb_defconfig               |  1 +
 configs/mt7623a_unielec_u7623_02_defconfig |  1 +
 configs/mt7623n_bpir2_defconfig            |  1 +
 configs/mt7629_rfb_defconfig               |  1 +
 configs/mt7981_emmc_rfb_defconfig          |  1 +
 configs/mt7981_rfb_defconfig               |  1 +
 configs/mt7981_sd_rfb_defconfig            |  1 +
 configs/mt7986_rfb_defconfig               |  1 +
 configs/mt7986a_bpir3_emmc_defconfig       |  1 +
 configs/mt7986a_bpir3_sd_defconfig         |  1 +
 configs/mt8512_bm1_emmc_defconfig          |  1 +
 configs/mt8518_ap1_emmc_defconfig          |  1 +
 configs/nyan-big_defconfig                 |  1 +
 configs/p2371-0000_defconfig               |  1 +
 configs/p2371-2180_defconfig               |  1 +
 configs/p2571_defconfig                    |  1 +
 configs/p2771-0000-000_defconfig           |  1 +
 configs/p2771-0000-500_defconfig           |  1 +
 configs/p3450-0000_defconfig               |  1 +
 configs/paz00_defconfig                    |  1 +
 configs/plutux_defconfig                   |  1 +
 configs/seaboard_defconfig                 |  1 +
 configs/tec-ng_defconfig                   |  1 +
 configs/tec_defconfig                      |  1 +
 configs/trimslice_defconfig                |  1 +
 configs/venice2_defconfig                  |  1 +
 configs/ventana_defconfig                  |  1 +
 include/configs/imx8mp_rsb3720.h           |  4 ----
 include/configs/mt7621.h                   |  2 --
 include/configs/mt7622.h                   |  4 ----
 include/configs/mt7623.h                   |  2 --
 include/configs/mt7629.h                   |  2 --
 include/configs/mt7981.h                   |  4 ----
 include/configs/mt7986.h                   |  4 ----
 include/configs/mt8512.h                   |  4 ----
 include/configs/mt8518.h                   |  5 -----
 include/configs/tegra-common-post.h        |  2 --
 54 files changed, 66 insertions(+), 52 deletions(-)

diff --git a/README b/README
index ee63a115fa91..edbcc02444a9 100644
--- a/README
+++ b/README
@@ -1547,25 +1547,6 @@ Configuration Settings:
 		boards which do not use the full malloc in SPL (which is
 		enabled with CONFIG_SYS_SPL_MALLOC).
 
-- CONFIG_SYS_NONCACHED_MEMORY:
-		Size of non-cached memory area. This area of memory will be
-		typically located right below the malloc() area and mapped
-		uncached in the MMU. This is useful for drivers that would
-		otherwise require a lot of explicit cache maintenance. For
-		some drivers it's also impossible to properly maintain the
-		cache. For example if the regions that need to be flushed
-		are not a multiple of the cache-line size, *and* padding
-		cannot be allocated between the regions to align them (i.e.
-		if the HW requires a contiguous array of regions, and the
-		size of each region is not cache-aligned), then a flush of
-		one region may result in overwriting data that hardware has
-		written to another region in the same cache-line. This can
-		happen for example in network drivers where descriptors for
-		buffers are typically smaller than the CPU cache-line (e.g.
-		16 bytes vs. 32 or 64 bytes).
-
-		Non-cached memory is only supported on 32-bit ARM at present.
-
 - CONFIG_SYS_BOOTMAPSZ:
 		Maximum size of memory mapped by the startup code of
 		the Linux kernel; all data that must be processed by
diff --git a/arch/Kconfig b/arch/Kconfig
index 1ffd77c0f4f8..ee5f8d801d7e 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -438,6 +438,30 @@ config TPL_SKIP_LOWLEVEL_INIT_ONLY
 	  normal CP15 init (such as enabling the instruction cache) is still
 	  performed.
 
+config SYS_HAS_NONCACHED_MEMORY
+	bool "Enable reserving a non-cached memory area for drivers"
+	depends on (ARM || MIPS) && (RTL8169 || MEDIATEK_ETH)
+	help
+	  This is useful for drivers that would otherwise require a lot of
+	  explicit cache maintenance. For some drivers it's also impossible to
+	  properly maintain the cache. For example if the regions that need to
+	  be flushed are not a multiple of the cache-line size, *and* padding
+	  cannot be allocated between the regions to align them (i.e.  if the
+	  HW requires a contiguous array of regions, and the size of each
+	  region is not cache-aligned), then a flush of one region may result
+	  in overwriting data that hardware has written to another region in
+	  the same cache-line. This can happen for example in network drivers
+	  where descriptors for buffers are typically smaller than the CPU
+	  cache-line (e.g.  16 bytes vs. 32 or 64 bytes).
+
+config SYS_NONCACHED_MEMORY
+	hex "Size in bytes of the non-cached memory area"
+	depends on SYS_HAS_NONCACHED_MEMORY
+	default 0x100000
+	help
+	  Size of non-cached memory area. This area of memory will be typically
+	  located right below the malloc() area and mapped uncached in the MMU.
+
 source "arch/arc/Kconfig"
 source "arch/arm/Kconfig"
 source "arch/m68k/Kconfig"
diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index 47ac0ef2720d..6ae838e8367a 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index d1d2c9047b85..c7561fea6c28 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/beaver_defconfig b/configs/beaver_defconfig
index 088ce8eee029..1f7774b1c80b 100644
--- a/configs/beaver_defconfig
+++ b/configs/beaver_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig
index c2960eb6d0d7..bf7bddd047e1 100644
--- a/configs/cardhu_defconfig
+++ b/configs/cardhu_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/cei-tk1-som_defconfig b/configs/cei-tk1-som_defconfig
index 424657d71015..6c9fca03e29e 100644
--- a/configs/cei-tk1-som_defconfig
+++ b/configs/cei-tk1-som_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 02e4a7c0b470..f30c644ddfc1 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index 86e421c1d4fb..39fce7391e12 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/dalmore_defconfig b/configs/dalmore_defconfig
index 2fef3a4daa2a..7ada40398a59 100644
--- a/configs/dalmore_defconfig
+++ b/configs/dalmore_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig
index 0dc0485c6cb4..a2c0b7a2124d 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/imx8mp_rsb3720a1_4G_defconfig b/configs/imx8mp_rsb3720a1_4G_defconfig
index 1f4ba696a516..9a44ae0a71c2 100644
--- a/configs/imx8mp_rsb3720a1_4G_defconfig
+++ b/configs/imx8mp_rsb3720a1_4G_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_SYS_TEXT_BASE=0x40200000
 CONFIG_SYS_MALLOC_LEN=0x2000000
diff --git a/configs/imx8mp_rsb3720a1_6G_defconfig b/configs/imx8mp_rsb3720a1_6G_defconfig
index 93373db92800..a0f72b3602f9 100644
--- a/configs/imx8mp_rsb3720a1_6G_defconfig
+++ b/configs/imx8mp_rsb3720a1_6G_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_SYS_TEXT_BASE=0x40200000
 CONFIG_SYS_MALLOC_LEN=0x2000000
diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig
index f4f0063abcf8..67b7d1c27c4f 100644
--- a/configs/jetson-tk1_defconfig
+++ b/configs/jetson-tk1_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig
index d51a124ed49a..2f4212ee9e66 100644
--- a/configs/medcom-wide_defconfig
+++ b/configs/medcom-wide_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/mt7621_nand_rfb_defconfig b/configs/mt7621_nand_rfb_defconfig
index 0ad4849eb2ae..16411bbb1d78 100644
--- a/configs/mt7621_nand_rfb_defconfig
+++ b/configs/mt7621_nand_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_MIPS=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_MALLOC_LEN=0x100000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
diff --git a/configs/mt7621_rfb_defconfig b/configs/mt7621_rfb_defconfig
index fa663648173d..17043d9f3cb8 100644
--- a/configs/mt7621_rfb_defconfig
+++ b/configs/mt7621_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_MIPS=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_MALLOC_LEN=0x100000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
diff --git a/configs/mt7622_rfb_defconfig b/configs/mt7622_rfb_defconfig
index 82660d83410c..bb8e14eaee09 100644
--- a/configs/mt7622_rfb_defconfig
+++ b/configs/mt7622_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt7623a_unielec_u7623_02_defconfig b/configs/mt7623a_unielec_u7623_02_defconfig
index f052d5e9a1c5..047382da2c4a 100644
--- a/configs/mt7623a_unielec_u7623_02_defconfig
+++ b/configs/mt7623a_unielec_u7623_02_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x81e00000
diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
index 8e101a5258e1..3baef4ccff16 100644
--- a/configs/mt7623n_bpir2_defconfig
+++ b/configs/mt7623n_bpir2_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x81e00000
diff --git a/configs/mt7629_rfb_defconfig b/configs/mt7629_rfb_defconfig
index 314a07d554ad..74c7ef48aae0 100644
--- a/configs/mt7629_rfb_defconfig
+++ b/configs/mt7629_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_ARCH_TIMER=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
diff --git a/configs/mt7981_emmc_rfb_defconfig b/configs/mt7981_emmc_rfb_defconfig
index e7809e691c6e..5df02c58c873 100644
--- a/configs/mt7981_emmc_rfb_defconfig
+++ b/configs/mt7981_emmc_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt7981_rfb_defconfig b/configs/mt7981_rfb_defconfig
index 4f429006d146..0d98fbfa2989 100644
--- a/configs/mt7981_rfb_defconfig
+++ b/configs/mt7981_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt7981_sd_rfb_defconfig b/configs/mt7981_sd_rfb_defconfig
index 2a66a280caf9..c7c4933b62e7 100644
--- a/configs/mt7981_sd_rfb_defconfig
+++ b/configs/mt7981_sd_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt7986_rfb_defconfig b/configs/mt7986_rfb_defconfig
index 0c7411332ca0..ef7a9c833b45 100644
--- a/configs/mt7986_rfb_defconfig
+++ b/configs/mt7986_rfb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt7986a_bpir3_emmc_defconfig b/configs/mt7986a_bpir3_emmc_defconfig
index 11ab8d13fd63..35f79b9c4f0e 100644
--- a/configs/mt7986a_bpir3_emmc_defconfig
+++ b/configs/mt7986a_bpir3_emmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt7986a_bpir3_sd_defconfig b/configs/mt7986a_bpir3_sd_defconfig
index 9420a5ac666f..7346377eeab6 100644
--- a/configs/mt7986a_bpir3_sd_defconfig
+++ b/configs/mt7986a_bpir3_sd_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
diff --git a/configs/mt8512_bm1_emmc_defconfig b/configs/mt8512_bm1_emmc_defconfig
index cea990860bdf..27c34c4b10f3 100644
--- a/configs/mt8512_bm1_emmc_defconfig
+++ b/configs/mt8512_bm1_emmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=13000000
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
diff --git a/configs/mt8518_ap1_emmc_defconfig b/configs/mt8518_ap1_emmc_defconfig
index 2072eb6d73c3..d9ba9ab14b84 100644
--- a/configs/mt8518_ap1_emmc_defconfig
+++ b/configs/mt8518_ap1_emmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=13000000
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig
index 6607edde8db5..a64a697fa170 100644
--- a/configs/nyan-big_defconfig
+++ b/configs/nyan-big_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x81000100
diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig
index a33a7fcccd8d..50fa0eb463ea 100644
--- a/configs/p2371-0000_defconfig
+++ b/configs/p2371-0000_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80080000
diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig
index b95a8f68528e..89b32bde9352 100644
--- a/configs/p2371-2180_defconfig
+++ b/configs/p2371-2180_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig
index 0dfd36e553b7..c15550375c28 100644
--- a/configs/p2571_defconfig
+++ b/configs/p2571_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80080000
diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig
index e291c3780898..45330fa9ace1 100644
--- a/configs/p2771-0000-000_defconfig
+++ b/configs/p2771-0000-000_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig
index 12282f378489..340616696d71 100644
--- a/configs/p2771-0000-500_defconfig
+++ b/configs/p2771-0000-500_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig
index b199fbeaf403..7f846c2441b4 100644
--- a/configs/p3450-0000_defconfig
+++ b/configs/p3450-0000_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
diff --git a/configs/paz00_defconfig b/configs/paz00_defconfig
index bb115221f6ca..d1c10584732a 100644
--- a/configs/paz00_defconfig
+++ b/configs/paz00_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/plutux_defconfig b/configs/plutux_defconfig
index 958392fd6c3f..718a7a7e55ea 100644
--- a/configs/plutux_defconfig
+++ b/configs/plutux_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig
index e3895f520e72..60d25b4003e6 100644
--- a/configs/seaboard_defconfig
+++ b/configs/seaboard_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/tec-ng_defconfig b/configs/tec-ng_defconfig
index 8745eed2aa30..a089bb9004b9 100644
--- a/configs/tec-ng_defconfig
+++ b/configs/tec-ng_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/tec_defconfig b/configs/tec_defconfig
index 99d34901d70f..226a86658bf9 100644
--- a/configs/tec_defconfig
+++ b/configs/tec_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig
index 8d94eedbe80c..91d7c2f8e50c 100644
--- a/configs/trimslice_defconfig
+++ b/configs/trimslice_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig
index 0ac9c4710aa2..478485e10798 100644
--- a/configs/venice2_defconfig
+++ b/configs/venice2_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80110000
diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig
index aac59831ea59..d25951b8df94 100644
--- a/configs/ventana_defconfig
+++ b/configs/ventana_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x00110000
diff --git a/include/configs/imx8mp_rsb3720.h b/include/configs/imx8mp_rsb3720.h
index b8abdb076340..5caabf21a646 100644
--- a/include/configs/imx8mp_rsb3720.h
+++ b/include/configs/imx8mp_rsb3720.h
@@ -41,10 +41,6 @@
 #if defined(CONFIG_CMD_NET)
 #define CONFIG_FEC_MXC_PHYADDR          4
 
-#ifdef CONFIG_DWC_ETH_QOS
-#define CONFIG_SYS_NONCACHED_MEMORY     (1 * SZ_1M)     /* 1M */
-#endif
-
 #define PHY_ANEG_TIMEOUT 20000
 
 #endif
diff --git a/include/configs/mt7621.h b/include/configs/mt7621.h
index 86e48f93349d..517b9b53b134 100644
--- a/include/configs/mt7621.h
+++ b/include/configs/mt7621.h
@@ -17,8 +17,6 @@
 
 #define CONFIG_SYS_INIT_SP_OFFSET	0x800000
 
-#define CONFIG_SYS_NONCACHED_MEMORY	0x100000
-
 /* MMC */
 #define MMC_SUPPORTS_TUNING
 
diff --git a/include/configs/mt7622.h b/include/configs/mt7622.h
index 78d79b7780bc..365b65973a81 100644
--- a/include/configs/mt7622.h
+++ b/include/configs/mt7622.h
@@ -9,10 +9,6 @@
 #ifndef __MT7622_H
 #define __MT7622_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY	SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_BASE                   CONFIG_SYS_TEXT_BASE
 
diff --git a/include/configs/mt7623.h b/include/configs/mt7623.h
index 0cd8b08552cf..73093f94d2b6 100644
--- a/include/configs/mt7623.h
+++ b/include/configs/mt7623.h
@@ -13,8 +13,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_NONCACHED_MEMORY	SZ_1M
-
 /* Environment */
 
 /* Preloader -> Uboot */
diff --git a/include/configs/mt7629.h b/include/configs/mt7629.h
index 22d11d014761..668dc3c4f741 100644
--- a/include/configs/mt7629.h
+++ b/include/configs/mt7629.h
@@ -13,8 +13,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_NONCACHED_MEMORY	SZ_1M
-
 /* Environment */
 
 /* Defines for SPL */
diff --git a/include/configs/mt7981.h b/include/configs/mt7981.h
index 01ad30960885..6e2a0b3706d6 100644
--- a/include/configs/mt7981.h
+++ b/include/configs/mt7981.h
@@ -9,10 +9,6 @@
 #ifndef __MT7981_H
 #define __MT7981_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY	SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
 
diff --git a/include/configs/mt7986.h b/include/configs/mt7986.h
index ccdd6abdb180..4c1575992068 100644
--- a/include/configs/mt7986.h
+++ b/include/configs/mt7986.h
@@ -9,10 +9,6 @@
 #ifndef __MT7986_H
 #define __MT7986_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY	SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
 
diff --git a/include/configs/mt8512.h b/include/configs/mt8512.h
index 964c95781338..5bf667aaba12 100644
--- a/include/configs/mt8512.h
+++ b/include/configs/mt8512.h
@@ -9,10 +9,6 @@
 #ifndef __MT8512_H
 #define __MT8512_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY		SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_START			CONFIG_SYS_TEXT_BASE
 
diff --git a/include/configs/mt8518.h b/include/configs/mt8518.h
index 6d4704644e4f..7cabbef92889 100644
--- a/include/configs/mt8518.h
+++ b/include/configs/mt8518.h
@@ -9,11 +9,6 @@
 #ifndef __MT8518_H
 #define __MT8518_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY		SZ_1M
-
-
 /* DRAM definition */
 #define CONFIG_SYS_SDRAM_BASE			0x40000000
 #define CONFIG_SYS_SDRAM_SIZE			0x20000000
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index c8f9d7cb175c..db3b3b38f156 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -7,8 +7,6 @@
 #ifndef __TEGRA_COMMON_POST_H
 #define __TEGRA_COMMON_POST_H
 
-#define CONFIG_SYS_NONCACHED_MEMORY	(1 << 20)	/* 1 MiB */
-
 #if CONFIG_IS_ENABLED(CMD_USB)
 # define BOOT_TARGET_USB(func) func(USB, usb, 0)
 #else
-- 
2.25.1



More information about the U-Boot mailing list