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 3BB9FEB64DA for ; Wed, 12 Jul 2023 14:15:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 713ED86ACC; Wed, 12 Jul 2023 16:15:34 +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="lHGrBY1p"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E084986ACF; Wed, 12 Jul 2023 16:15:33 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 3D96A86AA6 for ; Wed, 12 Jul 2023 16:15:31 +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 lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36CEFMLL026833; Wed, 12 Jul 2023 09:15:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1689171322; bh=g3jdIyRGj2PXuU7cO9+z9f4JzzwVHWu45YSMziwoe4Q=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=lHGrBY1picdtmCLMCNGh6UDeW6Al4ebp1DE9+a4IQt5sbr1PHehIp39anDw1iFBGA oU5Xm1YrZbUtexUErsRDXIzV09Q4S2L0pfX80kFuxcKW5MP/AgBLoUTh+XYxisaIfX FekLt9ogmsgWUvYota1oiT3M6bfvS0ts94TxLdYM= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36CEFMuT018676 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Jul 2023 09:15:22 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 12 Jul 2023 09:15:22 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 12 Jul 2023 09:15:22 -0500 Received: from [10.250.32.50] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36CEFLM9021562; Wed, 12 Jul 2023 09:15:21 -0500 Message-ID: <31f3f0bf-a3d7-18ee-14fc-be951c2a7b94@ti.com> Date: Wed, 12 Jul 2023 09:15:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v1 1/3] arm: k3: Fix ft_system_setup so it can be enabled on any SoC Content-Language: en-US To: Francesco Dolcini , , Tom Rini CC: Emanuele Ghidoli , Vignesh Raghavendra , Francesco Dolcini References: <20230712134730.30229-1-francesco@dolcini.it> <20230712134730.30229-2-francesco@dolcini.it> From: Andrew Davis In-Reply-To: <20230712134730.30229-2-francesco@dolcini.it> 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 7/12/23 8:47 AM, Francesco Dolcini wrote: > From: Emanuele Ghidoli > > ft_system_setup cannot be enabled on SoC without msmc sram otherwise > fdt_fixup_msmc_ram function fails causing system reset. > > Fix by calling fdt_fixup_msmc_ram only on these specific SoC: > - J721S2 > - AM654 > - J721E > > This change was verified to not change anything on any existing board > (all the J721S2, AM654 and J721E boards requires it, > none of the remaining k3 boards require it). > > Fixes: 30e96a240156 ("arm: mach-k3: Move MSMC fixup to SoC level") > Signed-off-by: Emanuele Ghidoli > Signed-off-by: Francesco Dolcini > --- > arch/arm/mach-k3/common.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c > index 34737a43aa08..f86ccaedc94f 100644 > --- a/arch/arm/mach-k3/common.c > +++ b/arch/arm/mach-k3/common.c > @@ -433,14 +433,18 @@ int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name) > #if defined(CONFIG_OF_SYSTEM_SETUP) > int ft_system_setup(void *blob, struct bd_info *bd) How about we rename this function to something like ft_msmc_sram_setup(), then only call it from board_setup for the platforms that needed it. Andrew > { > - int ret; > - > - ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); > - if (ret < 0) > - ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", > - "sram@70000000"); > - if (ret) > - printf("%s: fixing up msmc ram failed %d\n", __func__, ret); > + int ret = 0; > + > + if (IS_ENABLED(CONFIG_SOC_K3_J721S2) || > + IS_ENABLED(CONFIG_SOC_K3_AM654) || > + IS_ENABLED(CONFIG_SOC_K3_J721E)) { > + ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); > + if (ret < 0) > + ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", > + "sram@70000000"); > + if (ret) > + printf("%s: fixing up msmc ram failed %d\n", __func__, ret); > + } > > return ret; > }