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 ADD64C433EF for ; Fri, 1 Oct 2021 06:42:10 +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 29C79615A4 for ; Fri, 1 Oct 2021 06:42:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 29C79615A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de 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 8C25E80F3B; Fri, 1 Oct 2021 08:42:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="ZU0jC8s7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C36ED81F0C; Fri, 1 Oct 2021 08:42:05 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4808680516 for ; Fri, 1 Oct 2021 08:42:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1633070520; bh=8Q3Fi6NrFNCtS1Us5J0f6iff0td86Z5zDvBWjEyZMXk=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=ZU0jC8s751O8LtimQKR6ZS9hW05hl1xsc15mQZFqqF1On1TYv7V3ImDcRyklMcJ0Q mFE6HKmhYCCcBlDfXjJDhCZi9z4yz7myaZm4/qjhOLTn6qCMTheVRi45dwyNpxcAPF SkSTIS+LPsSgV12tEHaRDfd9XqMuGpJdzan8igME= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.35] ([88.152.144.157]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N8ofO-1mqSNC31Ow-015mky; Fri, 01 Oct 2021 08:42:00 +0200 Subject: Re: [RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC To: AKASHI Takahiro Cc: u-boot@lists.denx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org References: <20211001050228.55183-1-takahiro.akashi@linaro.org> <20211001050228.55183-2-takahiro.akashi@linaro.org> From: Heinrich Schuchardt Message-ID: <5fcb7f04-a1e5-ed16-b785-e624a74e5e11@gmx.de> Date: Fri, 1 Oct 2021 08:41:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211001050228.55183-2-takahiro.akashi@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:/J6wYbEtAOvSgcHlmuAQSAy2NJPxbl3Nf+XJ6QMEU/f02bSdRke Y09KeE8bP+OJRuSxobO7JTQnECPrB1/awuGVgBw0Xy+GwlEA/9uHGxb1ioRA2iJnCwKeLET Rq6YF3rFKbmCTnyuYhwUt7L7+P3hSe3ROYV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V RtDUtLJj01GF1xryIE2V5Q3G6jvS1cWLjAjEfWcAXmZyI6UqHq5TfwmJ2omUW2d3vVnXTT1PM sa5b22FYSAM+s9GfT8aSIhjMJPW7W0cgtCiYO3SjS6i/6X84V+bPiQuY+u9Z3lpDz/pRRA7Ql 4RPAs63M8hFCI8= 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 10/1/21 7:01 AM, AKASHI Takahiro wrote: > In blk_get_device_by_str(), the comment says: "Updates the partition tab= le > for the specified hw partition." > Since hw partition is supported only on MMC, it makes no sense to do so > for other devices. > > Signed-off-by: AKASHI Takahiro > --- > disk/part.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/disk/part.c b/disk/part.c > index a6a8f7052bd3..b330103a5bc0 100644 > --- a/disk/part.c > +++ b/disk/part.c > @@ -427,7 +427,8 @@ int blk_get_device_by_str(const char *ifname, const = char *dev_hwpart_str, > * Always should be done, otherwise hw partition 0 will return stale > * data after displaying a non-zero hw partition. > */ > - part_init(*dev_desc); > + if ((*dev_desc)->if_type =3D=3D IF_TYPE_MMC) > + part_init(*dev_desc); For an eMMC the following logical levels exist: * device * hardware partition * software partition Linux might show the following: /dev/mmcblk0 - user data area /dev/mmcblk0boot0 - boot hardware partition 0 /dev/mmcblk0boot1 - boot hardware partition 1 /dev/mmcblk0rpmb - replay protected memory block How are the different hardware partition modeled in the UEFI device path? Should each hardware partition be a separate udevice? For NOR flash we also have an extra level: =3D> setenv mtdparts mtdparts=3D30bb0000.qspi:1m(U-Boot),512k(Env),512k(DTB),2m(User_FS),12m(Da= ta_FS),4m(Factory_FS),34m(Ramdisk),10m(Linux) =3D> mtd device nor0 <30bb0000.qspi>, # parts =3D 8 #: name size offset mask_flags 0: U-Boot 0x00100000 0x00000000 0 1: Env 0x00080000 0x00100000 0 2: DTB 0x00080000 0x00180000 0 3: User_FS 0x00200000 0x00200000 0 4: Data_FS 0x00c00000 0x00400000 0 5: Factory_FS 0x00400000 0x01000000 0 6: Ramdisk 0x02200000 0x01400000 0 7: Linux 0x00a00000 0x03600000 0 active partition: nor0,0 - (U-Boot) 0x00100000 @ 0x00000000 Has part_info() to be called here too? What is the if_type? What are the devicepaths for these partitions? Best regards Heinrich > #endif > > cleanup: >