Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A870CC38A02 for ; Sat, 29 Oct 2022 00:28:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D3B82850D4; Sat, 29 Oct 2022 02:27:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="F2tqdRzh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF286850DA; Sat, 29 Oct 2022 02:27:27 +0200 (CEST) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E7295850DE for ; Sat, 29 Oct 2022 02:27:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf36.google.com with SMTP id ml12so5167617qvb.0 for ; Fri, 28 Oct 2022 17:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=F28KcQoesLu7QI/ruqqSrkoEpSuWopWNCsJCT53NIFs=; b=F2tqdRzhHd1vQNa5/vPiz/TXg7DCH4NKzRya8X0IL3LY03PKgGEuklqVpaXJ/l+Ubi rApThfGlqvpIMPf7cOe1zvhp7wUzC2UwWhFXR50mF8eDDSrRgcOqLp58CkwuFoBCl3D7 ffsTf53BuLpDaaG9bcH+Ly0/ZTjpKPyPoh76U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F28KcQoesLu7QI/ruqqSrkoEpSuWopWNCsJCT53NIFs=; b=dDLEsrCjK45gqWvX8gVIqy3iQkWopShcvsRfA2g2exGSoJwRGLMuLh2G6rqBT2+jC2 z5TXP8S1g8Mcl9MUjqu2Z2WlWAf6QatawC2kZ409DcBKj8+q+cI9yTXeY5giRpyuLlXQ KV9fMDTg8L1+EAXOwacPP/eUKR4ImQjafCKR3mXrSJaqCR51QgeuKFUITZ/0Li0fW8pk DvlGH3k57oEwqq3lu3iWhDhUr64jY9v39OFe7BU7zyK6joi2VjpoV3/V0BoZDbDMAMT+ P28Q9Zrs313Y6UwyzZwfdgX5FlUc0IsxdDk32HS9H2pwR9ZcEcnNdIl+b2S2ScPuv0mr ZkYQ== X-Gm-Message-State: ACrzQf2qi80vXf/pgtZT+TioeuqKFNgpzc1e2d6X/NSv1MGPiz2Qm1Q9 Q+zeB67nYa0zAtkAAbzaz6B3YOWVLsF+rg== X-Google-Smtp-Source: AMsMyM6R7tyiu8hOpNbrM2dgiFpDiA4cteNx1d7fJAh4NsH7zHBIjRdssiA1g3Xtglfk88yn3mvbYw== X-Received: by 2002:a05:6214:301e:b0:4bb:734c:9e9a with SMTP id ke30-20020a056214301e00b004bb734c9e9amr1898209qvb.38.1667003240441; Fri, 28 Oct 2022 17:27:20 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-21a2-cb17-4547-06d4.res6.spectrum.com. [2603:6081:7b00:6400:21a2:cb17:4547:6d4]) by smtp.gmail.com with ESMTPSA id v7-20020a05622a144700b00398313f286dsm65130qtx.40.2022.10.28.17.27.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 17:27:20 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 08/21] powerpc: Migrate SYS_L3_SIZE to Kconfig Date: Fri, 28 Oct 2022 20:27:01 -0400 Message-Id: <20221029002714.1598153-8-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221029002714.1598153-1-trini@konsulko.com> References: <20221029002714.1598153-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Introduce three options, one for each observed L3 cache size, and have the size select'd as needed. Signed-off-by: Tom Rini --- arch/powerpc/cpu/mpc85xx/Kconfig | 24 ++++++++++++++++++++++++ include/configs/P2041RDB.h | 2 -- include/configs/T102xRDB.h | 1 - include/configs/T104xRDB.h | 1 - include/configs/T208xQDS.h | 1 - include/configs/T208xRDB.h | 1 - include/configs/T4240RDB.h | 1 - include/configs/kmcent2.h | 1 - 8 files changed, 24 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index 7abfe26d35dd..24d3f1f20c25 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -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 diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index 0bd3bac97e43..7ccde665607b 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -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 diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 7630be245c1f..c5c2f8c038b2 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -104,7 +104,6 @@ * 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 diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 19e3dfbfdb12..532a5541dc87 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -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 diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index 6700560123b7..f97d0fc515b6 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -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 diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 4de4a72999e9..b765cbbadc41 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -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 diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index dc507473b259..384b9c1e02b9 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -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 diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h index 3def00164748..e5cc62ebdc27 100644 --- a/include/configs/kmcent2.h +++ b/include/configs/kmcent2.h @@ -154,7 +154,6 @@ * 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 -- 2.25.1