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 2AB60EB64D9 for ; Wed, 12 Jul 2023 14:38:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1232B86AF0; Wed, 12 Jul 2023 16:38:44 +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="OM2p4ura"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E30986AFE; Wed, 12 Jul 2023 16:38:42 +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 549E186AEE for ; Wed, 12 Jul 2023 16:38:39 +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 fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36CEcYIB107674; Wed, 12 Jul 2023 09:38:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1689172714; bh=3LUraBQx0gutr1jAgfihtl49IU5uocDBcDobYnTOxzE=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=OM2p4uranAiqYeShwGnSpJQUB1zM73akmLSSp/Q+6radYz72wXtzM5zge+GnfWCnp yfRcrCfwBpktYYJ2i1W6G3o+fJ5z+3ap+kPl79nNDt05+7V7JV0kY5qw3bdSQ9jcn2 rZBgz6tOzDciegxTCuXPcDol1Pb3xo8Hg1s3qhXU= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36CEcXU7072200 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Jul 2023 09:38:34 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE111.ent.ti.com (157.170.170.22) 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:38:33 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE100.ent.ti.com (157.170.170.30) 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:38:33 -0500 Received: from [10.250.32.50] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36CEcX7K099606; Wed, 12 Jul 2023 09:38:33 -0500 Message-ID: Date: Wed, 12 Jul 2023 09:38:33 -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 CC: , Tom Rini , Emanuele Ghidoli , Vignesh Raghavendra , Francesco Dolcini References: <20230712134730.30229-1-francesco@dolcini.it> <20230712134730.30229-2-francesco@dolcini.it> <31f3f0bf-a3d7-18ee-14fc-be951c2a7b94@ti.com> From: Andrew Davis In-Reply-To: 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 9:32 AM, Francesco Dolcini wrote: > On Wed, Jul 12, 2023 at 09:15:21AM -0500, Andrew Davis wrote: >> 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. > > This is partially reverting what you did in commit > 30e96a240156 ("arm: mach-k3: Move MSMC fixup to SoC level"). > > Is this fixup going to be required if tomorrow we have a new board using > the AM654 SoC (for example) or not? Depending on this answer we can > decide if ft_board_setup or ft_system_setup is the right function to use. > Maybe the issue is that we have a common ft_system_setup() function for all of K3, when these should be specific to each SoC.. They could call into common functions for common tasks like MSMC fixup, but no need to have one big ft_system_setup() for all K3. Andrew