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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05A84C433F5 for ; Thu, 7 Oct 2021 12:40:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F28A46105A for ; Thu, 7 Oct 2021 12:40:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F28A46105A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C1F7834B5; Thu, 7 Oct 2021 14:40:23 +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="pJn9Wwe2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 90931831B0; Thu, 7 Oct 2021 14:40:21 +0200 (CEST) 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 5EFC7834B9 for ; Thu, 7 Oct 2021 14:40:18 +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=p.yadav@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 197CeEto117857; Thu, 7 Oct 2021 07:40:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1633610414; bh=KvCur75Xbjvf2/mBHljIMxBbvplYU0ABBUaQ1fr7Yg4=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=pJn9Wwe26bfnsEUGb6YyjMsdfKpiZIICyogicO6cgtlGi+DB++pDLew5fs8BeqyGl S4SiWcLRUqwfjSOBa1OmHtFwbrO3nar9euh64w2+M/r9ktzVAPLsPCvtMZyRKJymqt VhmlX9s3BqPnjIVNsiH5Hd+QvQRmfDZOb/dYU0UQ= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 197CeEQj014546 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 7 Oct 2021 07:40:14 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 7 Oct 2021 07:40:14 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE112.ent.ti.com (157.170.170.23) 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, 7 Oct 2021 07:40:14 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 197CeDLU019690; Thu, 7 Oct 2021 07:40:13 -0500 Date: Thu, 7 Oct 2021 18:10:12 +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: <20211007124010.3aibcajzt4ojwcqr@ti.com> References: <20210914032849.273625-1-marex@denx.de> <20210923185316.se55powofpm37mg3@ti.com> <55953baa-c585-f180-aff3-b68d3acee34b@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <55953baa-c585-f180-aff3-b68d3acee34b@denx.de> 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.34 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 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? 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? -- Regards, Pratyush Yadav Texas Instruments Inc.