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 924D3C6FD18 for ; Tue, 28 Mar 2023 13:58:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 843CF85AEC; Tue, 28 Mar 2023 15:58:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="ZSLClsxu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F053885AEC; Tue, 28 Mar 2023 15:58:39 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 57A4F857DB for ; Tue, 28 Mar 2023 15:58:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32SDwXUF046781 for ; Tue, 28 Mar 2023 08:58:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680011913; bh=FZ8GSrk6zApHN6729XVXh8neBxNqr7zR5TtAtqVPBxw=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=ZSLClsxuy105Q/30KSrStoXlxrwgUn181cviz7KL+ziHzji5fbjhBJizJSiXeiBBk fyd0YKRhcFJoKFZ4MDU9NSZvLb2SlOCoVN8mjEcQmj+4w48J4XHtMRIyu43dR//Ogk HG4l3qIDlCRj19r0XY7UXZFQk5TM6GN9Gy1vRVQg= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32SDwXub025791 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 28 Mar 2023 08:58:33 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 28 Mar 2023 08:58:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 28 Mar 2023 08:58:33 -0500 Received: from [10.250.32.170] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32SDwWwK023962; Tue, 28 Mar 2023 08:58:33 -0500 Message-ID: <60a1402a-bb50-81ab-16f6-9657b4bf6f9b@ti.com> Date: Tue, 28 Mar 2023 08:58:32 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] arch: mach-k3: j721s2_init: Disable the firewalls Content-Language: en-US To: Jayesh Choudhary , CC: , References: <20230328130201.324528-1-j-choudhary@ti.com> From: Andrew Davis In-Reply-To: <20230328130201.324528-1-j-choudhary@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.8 at phobos.denx.de X-Virus-Status: Clean On 3/28/23 8:02 AM, Jayesh Choudhary wrote: > Some firewalls enabled by ROM are still left on. So some > address space is inaccessible to the bootloader. For example, > in OSPI boot mode we get an exception and the system hangs. > Therefore, disable all the firewalls left on by the ROM. > > Signed-off-by: Jayesh Choudhary > --- Matches what we do in j721e_init.c, LGTM, Reviewed-by: Andrew Davis > arch/arm/mach-k3/j721s2_init.c | 53 ++++++++++++++++++++++++++++++++++ > 1 file changed, 53 insertions(+) > > diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c > index 09e55ed456..7d347b5156 100644 > --- a/arch/arm/mach-k3/j721s2_init.c > +++ b/arch/arm/mach-k3/j721s2_init.c > @@ -22,6 +22,51 @@ > #include > #include > > +struct fwl_data cbass_hc_cfg0_fwls[] = { > + { "PCIE0_CFG", 2577, 7 }, > + { "EMMC8SS0_CFG", 2579, 4 }, > + { "USB3SS0_CORE", 2580, 4 }, > + { "USB3SS1_CORE", 2581, 1 }, > +}, cbass_hc2_fwls[] = { > + { "PCIE0", 2547, 24 }, > + { "HC2_WIZ16B8M4CT2", 2552, 1 }, > +}, cbass_rc_cfg0_fwls[] = { > + { "EMMCSD4SS0_CFG", 2400, 4 }, > +}, infra_cbass0_fwls[] = { > + { "PSC0", 5, 1 }, > + { "PLL_CTRL0", 6, 1 }, > + { "PLL_MMR0", 8, 26 }, > + { "CTRL_MMR0", 9, 16 }, > + { "GPIO0", 16, 1 }, > +}, mcu_cbass0_fwls[] = { > + { "MCU_R5FSS0_CORE0", 1024, 4 }, > + { "MCU_R5FSS0_CORE0_CFG", 1025, 3 }, > + { "MCU_R5FSS0_CORE1", 1028, 4 }, > + { "MCU_R5FSS0_CORE1_CFG", 1029, 1 }, > + { "MCU_FSS0_CFG", 1032, 12 }, > + { "MCU_FSS0_S1", 1033, 8 }, > + { "MCU_FSS0_S0", 1036, 8 }, > + { "MCU_PSROM49152X32", 1048, 1 }, > + { "MCU_MSRAM128KX64", 1050, 8 }, > + { "MCU_MSRAM128KX64_CFG", 1051, 1 }, > + { "MCU_TIMER0", 1056, 1 }, > + { "MCU_TIMER9", 1065, 1 }, > + { "MCU_USART0", 1120, 1 }, > + { "MCU_I2C0", 1152, 1 }, > + { "MCU_CTRL_MMR0", 1200, 8 }, > + { "MCU_PLL_MMR0", 1201, 3 }, > + { "MCU_CPSW0", 1220, 2 }, > +}, wkup_cbass0_fwls[] = { > + { "WKUP_PSC0", 129, 1 }, > + { "WKUP_PLL_CTRL0", 130, 1 }, > + { "WKUP_CTRL_MMR0", 131, 16 }, > + { "WKUP_GPIO0", 132, 1 }, > + { "WKUP_I2C0", 144, 1 }, > + { "WKUP_USART0", 160, 1 }, > +}, navss_cbass0_fwls[] = { > + { "NACSS_VIRT0", 6253, 1 }, > +}; > + > static void ctrl_mmr_unlock(void) > { > /* Unlock all WKUP_CTRL_MMR0 module registers */ > @@ -150,6 +195,14 @@ void k3_spl_init(void) > if (ret) > panic("Failed to initialize clk-k3!\n"); > } > + > + remove_fwl_configs(cbass_hc_cfg0_fwls, ARRAY_SIZE(cbass_hc_cfg0_fwls)); > + remove_fwl_configs(cbass_hc2_fwls, ARRAY_SIZE(cbass_hc2_fwls)); > + remove_fwl_configs(cbass_rc_cfg0_fwls, ARRAY_SIZE(cbass_rc_cfg0_fwls)); > + remove_fwl_configs(infra_cbass0_fwls, ARRAY_SIZE(infra_cbass0_fwls)); > + remove_fwl_configs(mcu_cbass0_fwls, ARRAY_SIZE(mcu_cbass0_fwls)); > + remove_fwl_configs(wkup_cbass0_fwls, ARRAY_SIZE(wkup_cbass0_fwls)); > + remove_fwl_configs(navss_cbass0_fwls, ARRAY_SIZE(navss_cbass0_fwls)); > } > > /* Output System Firmware version info */