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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80584C7EE23 for ; Sun, 28 May 2023 11:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbjE1Ll2 (ORCPT ); Sun, 28 May 2023 07:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjE1Ll0 (ORCPT ); Sun, 28 May 2023 07:41:26 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE27BC; Sun, 28 May 2023 04:41:23 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1q3Els-0006sD-0g; Sun, 28 May 2023 11:41:12 +0000 Date: Sun, 28 May 2023 12:41:02 +0100 From: Daniel Golle To: Frank Wunderlich Cc: linux-mediatek@lists.infradead.org, Frank Wunderlich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH] arm64: dts: mt7986: use size of reserved partition for bl2 Message-ID: References: <20230528113343.7649-1-linux@fw-web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230528113343.7649-1-linux@fw-web.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 28, 2023 at 01:33:42PM +0200, Frank Wunderlich wrote: > From: Frank Wunderlich > > To store uncompressed bl2 more space is required than partition is > actually defined. > > There is currently no known usage of this reserved partition. > Openwrt uses same partition layout. > > We added same change to u-boot with commit d7bb1099 [1]. > > [1] https://source.denx.de/u-boot/u-boot/-/commit/d7bb109900c1ca754a0198b9afb50e3161ffc21e > > Cc: stable@vger.kernel.org > Fixes: 8e01fb15b815 ("arm64: dts: mt7986: add Bananapi R3") > Signed-off-by: Frank Wunderlich Reviewed-by: Daniel Golle > --- > If the bl2 does not fit into the bl2-partition (cut off), board does > not boot, thats why i want to increase it now. My current bl2 is 197K > for nor and i ran into this problem. > > Openwrt uses also the first reserved partition to give bl2 more > space: > > https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-nor.dts;h=f597b869abc80d1a73f44ebb85ad4da17376bb52;hb=HEAD#l22 > > so imho it should be same in mainline to not require complex bl2 > compression. > > have now sent the board-specific dts to uboot too: > https://source.denx.de/u-boot/u-boot/-/commit/d7bb109900c1ca754a0198b9afb50e3161ffc21e > --- > .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso > index 84aa229e80f3..e48881be4ed6 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso > +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dtso > @@ -27,15 +27,10 @@ partitions { > > partition@0 { > label = "bl2"; > - reg = <0x0 0x20000>; > + reg = <0x0 0x40000>; > read-only; > }; > > - partition@20000 { > - label = "reserved"; > - reg = <0x20000 0x20000>; > - }; > - > partition@40000 { > label = "u-boot-env"; > reg = <0x40000 0x40000>; > -- > 2.34.1 >