]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc: Migrate SYS_L3_SIZE to Kconfig
authorTom Rini <trini@konsulko.com>
Sat, 29 Oct 2022 00:27:01 +0000 (20:27 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 10 Nov 2022 14:45:54 +0000 (09:45 -0500)
Introduce three options, one for each observed L3 cache size, and have
the size select'd as needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/powerpc/cpu/mpc85xx/Kconfig
include/configs/P2041RDB.h
include/configs/T102xRDB.h
include/configs/T104xRDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/T4240RDB.h
include/configs/kmcent2.h

index 7abfe26d35ddc83f2b4d827a4173094f3a322b93..24d3f1f20c2530d57f94cee76c536ab65190f28b 100644 (file)
@@ -165,6 +165,7 @@ config TARGET_P2041RDB
        select BOARD_LATE_INIT if CHAIN_OF_TRUST
        select FSL_CORENET
        select PHYS_64BIT
+       select SYS_L3_SIZE_1024KB
        imply CMD_SATA
        imply FSL_SATA
 
@@ -182,6 +183,7 @@ config TARGET_T1024RDB
        select SUPPORT_SPL
        select PHYS_64BIT
        select FSL_DDR_INTERACTIVE
+       select SYS_L3_SIZE_256KB
        imply CMD_EEPROM
        imply PANIC_HANG
 
@@ -191,6 +193,7 @@ config TARGET_T1042RDB
        select BOARD_LATE_INIT if CHAIN_OF_TRUST
        select SUPPORT_SPL
        select PHYS_64BIT
+       select SYS_L3_SIZE_256KB
 
 config TARGET_T1042D4RDB
        bool "Support T1042D4RDB"
@@ -198,6 +201,7 @@ config TARGET_T1042D4RDB
        select BOARD_LATE_INIT if CHAIN_OF_TRUST
        select SUPPORT_SPL
        select PHYS_64BIT
+       select SYS_L3_SIZE_256KB
        imply PANIC_HANG
 
 config TARGET_T1042RDB_PI
@@ -206,6 +210,7 @@ config TARGET_T1042RDB_PI
        select BOARD_LATE_INIT if CHAIN_OF_TRUST
        select SUPPORT_SPL
        select PHYS_64BIT
+       select SYS_L3_SIZE_256KB
        imply PANIC_HANG
 
 config TARGET_T2080QDS
@@ -216,6 +221,7 @@ config TARGET_T2080QDS
        select PHYS_64BIT
        select FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
        select FSL_DDR_INTERACTIVE
+       select SYS_L3_SIZE_512KB
        imply CMD_SATA
 
 config TARGET_T2080RDB
@@ -224,6 +230,7 @@ config TARGET_T2080RDB
        select BOARD_LATE_INIT if CHAIN_OF_TRUST
        select SUPPORT_SPL
        select PHYS_64BIT
+       select SYS_L3_SIZE_512KB
        imply CMD_SATA
        imply PANIC_HANG
 
@@ -233,6 +240,7 @@ config TARGET_T4240RDB
        select SUPPORT_SPL
        select PHYS_64BIT
        select FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
+       select SYS_L3_SIZE_512KB
        imply CMD_SATA
        imply PANIC_HANG
 
@@ -244,6 +252,7 @@ config TARGET_KMCENT2
        bool "Support kmcent2"
        select VENDOR_KM
        select FSL_CORENET
+       select SYS_L3_SIZE_256KB
 
 endchoice
 
@@ -1296,6 +1305,21 @@ config SYS_L2_SIZE
 config BACKSIDE_L2_CACHE
        bool
 
+config SYS_L3_SIZE_256KB
+       bool
+
+config SYS_L3_SIZE_512KB
+       bool
+
+config SYS_L3_SIZE_1024KB
+       bool
+
+config SYS_L3_SIZE
+       int
+       default 262144 if SYS_L3_SIZE_256KB
+       default 524288 if SYS_L3_SIZE_512KB
+       default 1048576 if SYS_L3_SIZE_512KB
+
 config SYS_PPC64
        bool
 
index f4027ed01a28dc343362cd22dafd7d45aa4b19f7..874910f24e3160448596c582e610c62c28dbdf95 100644 (file)
@@ -59,8 +59,6 @@
 #else
 #define CONFIG_SYS_INIT_L3_ADDR_PHYS   CONFIG_SYS_INIT_L3_ADDR
 #endif
-#define CONFIG_SYS_L3_SIZE             (1024 << 10)
-#define CONFIG_SYS_INIT_L3_END (CONFIG_SYS_INIT_L3_ADDR + CONFIG_SYS_L3_SIZE)
 
 #ifdef CONFIG_PHYS_64BIT
 #define CONFIG_SYS_DCSRBAR             0xf0000000
index 27bc387814a8eba0c3a8cacf559a2092dd30b481..72b98c5f27f1b219d3a67a77475ed5e087c807ab 100644 (file)
  *  Config the L3 Cache as L3 SRAM
  */
 #define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
-#define CONFIG_SYS_L3_SIZE             (256 << 10)
 #define SPL_ENV_ADDR                   (CONFIG_SPL_GD_ADDR + 4 * 1024)
 
 #ifdef CONFIG_PHYS_64BIT
index d91a13f8afd9250fbffc58aa83bd05eed41f9c3b..f8c905404d5740ef003d1d22926e0bdd04d30a54 100644 (file)
@@ -78,7 +78,6 @@
  * (CONFIG_SYS_INIT_L3_VADDR) will be different.
  */
 #define CONFIG_SYS_INIT_L3_VADDR       0xFFFC0000
-#define CONFIG_SYS_L3_SIZE             256 << 10
 #define SPL_ENV_ADDR                   (CONFIG_SPL_GD_ADDR + 4 * 1024)
 
 #define CONFIG_SYS_DCSRBAR             0xf0000000
index 5d5d6346fa63414796cfc459db10db47921a002e..8d3b49655ac559ff2c055acaad3e83412cf474d5 100644 (file)
@@ -76,7 +76,6 @@
  * Config the L3 Cache as L3 SRAM
  */
 #define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
-#define CONFIG_SYS_L3_SIZE             (512 << 10)
 #define SPL_ENV_ADDR                   (CONFIG_SPL_GD_ADDR + 4 * 1024)
 
 #define CONFIG_SYS_DCSRBAR     0xf0000000
index 407350c25c3cead2fdf9c88b2f303fa4d720123c..86c92de50e9aed53ccfc522793ec3ccb68d06c1e 100644 (file)
@@ -71,7 +71,6 @@
  * Config the L3 Cache as L3 SRAM
  */
 #define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
-#define CONFIG_SYS_L3_SIZE             (512 << 10)
 #define SPL_ENV_ADDR                   (CONFIG_SPL_GD_ADDR + 4 * 1024)
 
 #define CONFIG_SYS_DCSRBAR     0xf0000000
index c8875c809c307fcf7813fba88c001e07e153c18d..05c4406b77041daf353aa5fa049e2637a12c566d 100644 (file)
@@ -52,7 +52,6 @@
  *  Config the L3 Cache as L3 SRAM
  */
 #define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
-#define CONFIG_SYS_L3_SIZE             (512 << 10)
 #define SPL_ENV_ADDR                   (CONFIG_SPL_GD_ADDR + 4 * 1024)
 
 #define CONFIG_SYS_DCSRBAR             0xf0000000
index 3def00164748dec265e626a9c2d653f54e031d28..e5cc62ebdc271414849cc919d66463a3a47e1ebc 100644 (file)
  *  Config the L3 Cache as L3 SRAM
  */
 #define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
-#define CONFIG_SYS_L3_SIZE             256 << 10
 
 #define CONFIG_SYS_DCSRBAR             0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS                0xf00000000ull