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 28294C4167B for ; Mon, 6 Nov 2023 12:18:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8913A86BD7; Mon, 6 Nov 2023 13:18:55 +0100 (CET) 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="bunPpdrq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35704868AE; Mon, 6 Nov 2023 13:18:53 +0100 (CET) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 920C786489 for ; Mon, 6 Nov 2023 13:18:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3A6CIY4K070255; Mon, 6 Nov 2023 06:18:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1699273115; bh=GyzUn3eyUWlLcF446E4r6RRESWzIwn7WIl3epvSyIpU=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=bunPpdrq0kfPuD6o25UtFGSamyHspw8+wzs1urOgeCK/us90TKO00BlJY8IOWy8rV g0FMtZ/cCKCvjg9KNadvAaYasvNQDX7qAKZmtt2s+vsvEXpaUMhpAxv+BIrq75WESi siZllmgZAcg6F0xIuTs94XMSH4i3N7Ds9C6SyL2o= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3A6CIY1B128470 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 6 Nov 2023 06:18:34 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) 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; Mon, 6 Nov 2023 06:18:34 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE101.ent.ti.com (157.170.170.31) 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; Mon, 6 Nov 2023 06:18:34 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3A6CIYEh083768; Mon, 6 Nov 2023 06:18:34 -0600 Date: Mon, 6 Nov 2023 06:18:34 -0600 From: Nishanth Menon To: "Kumar, Udit" CC: Tom Rini , Heinrich Schuchardt , Sinthu Raja , Manorit Chawdhry , Reid Tonking , Neha Malcom Francis , Andrew Davis , Simon Glass , Robert Nelson , Jason Kridner , Subject: Re: [PATCH 01/15] arm: mach-k3: j721e: Improve support for UDA FS Message-ID: <20231106121834.khfhuzcav2fvmy23@overuse> References: <20231103003805.2420005-1-nm@ti.com> <20231103003805.2420005-2-nm@ti.com> <0b3ecb9a-7099-4296-88af-dd204ffa600f@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <0b3ecb9a-7099-4296-88af-dd204ffa600f@ti.com> 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 15:54-20231104, Kumar, Udit wrote: > > On 11/3/2023 6:07 AM, Nishanth Menon wrote: > > Commit 5019170970ad ("arch: arm: mach-k3: j721e: add support for UDA > > FS") introduced basic UDA FS support, however, we can Take approach > > similar to commit 0f1c1e8b368b ("arm: mach-k3: am625: Add support for > > UDA FS"). While boot partition support with EMMC boot is useful, it is > > constrained by the size of boot hardware partition itself. > > > > In the case of K3 devices, tispl images can contain OP-TEE images that > > can substantially vary in size and the u-boot image itself can vary over > > time as we enable various features. > > > > So use the CSD information in the case of EMMC_BOOT configuration being > > enabled to pick boot partition or UDA FS mode operation to pick. > > > > If EMMC_BOOT is disabled, then depend on filesystem configuration to > > pick data from UDA. > > I am thinking, in which case we have EMMC_BOOT disabled, > > Case here I am considering, updating u-boot to eMMC from u-boot shell, If > EMMC_BOOT > > is not set then , we can not set CSD information Yes, but we cannot use boot0 mode of operation for Beagle family. the size of u-boot and optee vary over time and SK's boot0 partition strategy does'nt work for Beagle platforms. > > > > > Signed-off-by: Nishanth Menon > > --- > > arch/arm/mach-k3/j721e_init.c | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c > > index b1f7e25ed092..bcdfbfc79c4a 100644 > > --- a/arch/arm/mach-k3/j721e_init.c > > +++ b/arch/arm/mach-k3/j721e_init.c > > @@ -294,7 +294,14 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) > > { > > switch (boot_device) { > > case BOOT_DEVICE_MMC1: > > - return (spl_mmc_emmc_boot_partition(mmc) ? MMCSD_MODE_EMMCBOOT : MMCSD_MODE_FS); > > + if (IS_ENABLED(CONFIG_SUPPORT_EMMC_BOOT)) { > > + if (spl_mmc_emmc_boot_partition(mmc)) > > + return MMCSD_MODE_EMMCBOOT; > > + return MMCSD_MODE_FS; > > + } > > I had a view EMMC_BOOT should be needed config. > > > > + if (IS_ENABLED(CONFIG_SPL_FS_FAT) || IS_ENABLED(CONFIG_SPL_FS_EXT4)) > > + return MMCSD_MODE_FS; > > + return MMCSD_MODE_EMMCBOOT; > > If you consider, to make EMMC_BOOT as needed config, then this is not needed EMMC_BOOT is not a mandatory config. > > > > case BOOT_DEVICE_MMC2: > > return MMCSD_MODE_FS; > > default: -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D