From mboxrd@z Thu Jan 1 00:00:00 1970 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 D7905C433EF for ; Thu, 2 Dec 2021 09:15:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 08C3E8193A; Thu, 2 Dec 2021 10:15:02 +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="nKDZJt4q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AD8C9817E1; Thu, 2 Dec 2021 10:14:58 +0100 (CET) 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 0079082F43 for ; Thu, 2 Dec 2021 10:14:54 +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=p.yadav@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 1B29EnGm123492; Thu, 2 Dec 2021 03:14:49 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1638436489; bh=BcA5FrKa5JjA6BhZZ4wNwbE5fndPL9/i29bvgLNiRZQ=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=nKDZJt4qGleEsuSNFYbYOcuQ0JE/CdeM1246LoJ7yFE/kwKFhOzJV9BOUWSR/6L+u iG1g15Zsg7uXOQzs7oHYB+8Uujzbl29spr31d5Zf15jM/vCNsCEHLrdp1jSfzdvoQP yrZhw46SpbJ8TeDAZaZ0uUv8BQFxuR/2XNL098Ws= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 1B29EnW8065323 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 Dec 2021 03:14:49 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 2 Dec 2021 03:14:48 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Thu, 2 Dec 2021 03:14:48 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 1B29EmBp032847; Thu, 2 Dec 2021 03:14:48 -0600 Date: Thu, 2 Dec 2021 14:44:47 +0530 From: Pratyush Yadav To: Marek Vasut CC: , Jagan Teki , Vignesh R Subject: Re: [PATCH] mtd: sf: Set SF parameters as env variables Message-ID: <20211202091445.4pd2zv7lhpaomqqy@ti.com> References: <20210914032849.273625-1-marex@denx.de> <20210923185316.se55powofpm37mg3@ti.com> <55953baa-c585-f180-aff3-b68d3acee34b@denx.de> <20211007124010.3aibcajzt4ojwcqr@ti.com> <2c3df1fb-31ca-f996-9a7d-41befa9bd6fa@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Marek, On 28/11/21 10:56PM, Marek Vasut wrote: > On 10/7/21 2:46 PM, Marek Vasut wrote: > > On 10/7/21 2:40 PM, Pratyush Yadav wrote: > > > On 23/09/21 10:00PM, Marek Vasut wrote: > > > > On 9/23/21 8:53 PM, Pratyush Yadav wrote: > > > > > On 14/09/21 05:28AM, Marek Vasut wrote: > > > > > > Set the SF page size, erase block size and total size as > > > > > > an environment > > > > > > variable after "sf probe". This lets us discern boards with multiple > > > > > > distinct SPI flash options and also e.g. set mtdparts accordingly. > > > > > > > > > > I don't quite follow the rationale for making these environment > > > > > variables. Wouldn't you be better off finding this info out via mtd or > > > > > sf command? > > > > > > > > I need to use that info in a script, that's why these env vars. > > > > > > Ok. Honestly, it doesn't feel quite right to me. > > > > > > I haven't played with U-Boot's shell too much but is there no way to > > > assign variables from command outputs? > > > > Not that I know of. > > > > > For example, can we do something > > > like `foo=$(cat a.txt)`? If that is possible, maybe add some new > > > subcommands to "sf" that return this information? > > > > What you would want to have is per-device runtime properties, kind-of > > like reduced sysfs, which would need VFS in U-Boot, and we do not have > > that yet. > > Are there any news on this patch ? All I would say is that I do not particularly like what this patch is doing, but I also can't give you an alternative solution to the problem unfortunately. So I drop my $0.02 here and leave it up to you and Jagan to figure it out. -- Regards, Pratyush Yadav Texas Instruments Inc.