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 E090AC433EF for ; Tue, 28 Jun 2022 18:29:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E5847842DF; Tue, 28 Jun 2022 20:29:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="XH4WAWi6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 329D584428; Tue, 28 Jun 2022 20:28:59 +0200 (CEST) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7C59F8407A for ; Tue, 28 Jun 2022 20:28:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x733.google.com with SMTP id n10so6924575qkn.10 for ; Tue, 28 Jun 2022 11:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mnoYtW7ncBZlkbWxdMflz3gyulZzG3CYtberRL0UAXM=; b=XH4WAWi6JUm4iZBi77/JjR6Ihk1nfuxO1ObEElNgU8JI0Bs67mESUasbJiHv3Fk5BZ J7fyNxPOGXIzVkSM1WE7oatZWtrHykDmGJbxkUnG/3HfJk1C6Cl+L/qWC1PFDXmFAPYT +yTJxFgxkITBWNlJePybeBhg0xkn7U/C4IKbc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mnoYtW7ncBZlkbWxdMflz3gyulZzG3CYtberRL0UAXM=; b=rsp3G6DzEV2xma0DF/dqRSeilYFnbjQpv6DTDTct/gNYOi1boUXv9tWpVrF/97iqU8 CgeP3XOthIAStAkVoWwpPGW4JUFA0pIP/e4woYYtpJVjS8kP9ttZr2vcKyc409OzKOHx K1wsQ8b6LJPfO82XEvBukq0cybgZ0vWY8pHCOWRwa5PS30lvJE+15wOtSwj1sSEbCkun CI5nDNm5qVlyAv4qPpVCbi69nGFadWjxZDm8DATQXa6A9bLI265EgLP2E9YQbWz9dOGk kvoH9O0KdIbW7MGzyvtZ4Y15H5AC+TjA+f0FOsb+UpPo8e/3KgPyQI5sX19wxOvC6Ll+ 2F/Q== X-Gm-Message-State: AJIora+YfUq5nx0+0pUgnBvpAoXn2MquMGRtJPBgoLJbdM/S0Js3idla nlXeq+rhXk8vBNj2dEo87VpvA0HfY9yPOw== X-Google-Smtp-Source: AGRyM1sPOtdAtfhltHvNf9IlhTUUqw/4D2l59fi1FXU2Ora03Rvx3AjmBn6uFeoR5aDh6VE5PSOQHw== X-Received: by 2002:a05:620a:4246:b0:6a8:b684:8518 with SMTP id w6-20020a05620a424600b006a8b6848518mr12292980qko.479.1656440935213; Tue, 28 Jun 2022 11:28:55 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id bw20-20020a05622a099400b00304bc2acc25sm9429527qtb.6.2022.06.28.11.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 11:28:54 -0700 (PDT) Date: Tue, 28 Jun 2022 14:28:52 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Priyanka Jain , "Peng Fan (OSS)" , u-boot@lists.denx.de Subject: Re: [PATCH v2] board: freescale: p1_p2_rdb_pc: Simplify SPL offset macros Message-ID: <20220628182852.GP1146598@bill-the-cat> References: <20220405131237.405-9-pali@kernel.org> <20220628175355.27817-1-pali@kernel.org> <20220628181742.GO1146598@bill-the-cat> <20220628182238.cmjhgpidicikyubo@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dT+85zccSFkyJC53" Content-Disposition: inline In-Reply-To: <20220628182238.cmjhgpidicikyubo@pali> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --dT+85zccSFkyJC53 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 28, 2022 at 08:22:38PM +0200, Pali Roh=E1r wrote: > On Tuesday 28 June 2022 14:17:42 Tom Rini wrote: > > On Tue, Jun 28, 2022 at 07:53:55PM +0200, Pali Roh=E1r wrote: > >=20 > > > Now when CONFIG_SYS_TEXT_BASE has sane value, use it for calculation = of > > > other SPL offset values: CONFIG_SPL_MAX_SIZE, CONFIG_SYS_MMC_U_BOOT_*= and > > > CONFIG_SYS_SPI_FLASH_U_BOOT_* macros. > > >=20 > > > No functional change. > > >=20 > > > Signed-off-by: Pali Roh=E1r > > > --- > > > Changes in v2: > > > * Rebased on top of the U-Boot next branch, commit d61c11b8c894fad517= 677dc51ee82d1eade39c01 > > > --- > > > include/configs/p1_p2_rdb_pc.h | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > >=20 > > > diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_r= db_pc.h > > > index 56a16502dcc7..7237e3c1a63c 100644 > > > --- a/include/configs/p1_p2_rdb_pc.h > > > +++ b/include/configs/p1_p2_rdb_pc.h > > > @@ -78,15 +78,15 @@ > > > =20 > > > #ifdef CONFIG_SDCARD > > > #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) > > > -#define CONFIG_SYS_MMC_U_BOOT_DST (0x11000000) > > > -#define CONFIG_SYS_MMC_U_BOOT_START (0x11000000) > > > -#define CONFIG_SYS_MMC_U_BOOT_OFFS (128 << 10) > > > +#define CONFIG_SYS_MMC_U_BOOT_DST CONFIG_SYS_TEXT_BASE > > > +#define CONFIG_SYS_MMC_U_BOOT_START CONFIG_SYS_TEXT_BASE > > > +#define CONFIG_SYS_MMC_U_BOOT_OFFS CONFIG_SPL_PAD_TO > > > #define CONFIG_SYS_MPC85XX_NO_RESETVEC > > > #elif defined(CONFIG_SPIFLASH) > > > #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10) > > > -#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x11000000) > > > -#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x11000000) > > > -#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (128 << 10) > > > +#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST CONFIG_SYS_TEXT_BASE > > > +#define CONFIG_SYS_SPI_FLASH_U_BOOT_START CONFIG_SYS_TEXT_BASE > > > +#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS CONFIG_SPL_PAD_TO > > > #define CONFIG_SYS_MPC85XX_NO_RESETVEC > > > #elif defined(CONFIG_MTD_RAW_NAND) > > > #ifdef CONFIG_TPL_BUILD > >=20 > > So, this is entirely a PowerPC spl set of CONFIG variables. Can we move > > them to Kconfig, and use default xxx as you're changing them to above? > > The other platforms using this look to be doing the same at first > > glance. > >=20 > > --=20 > > Tom >=20 > Not sure how to do it right now. CONFIG_SYS_MMC_U_BOOT_OFFS would need > to be adjusted by size of boot sector, as is in this patch: > https://patchwork.ozlabs.org/project/uboot/patch/20220405134032.704-3-pal= i@kernel.org/ >=20 > So I just sent patch in current form which simplify definitions of > CONFIG_SYS_MMC_U_BOOT_* and CONFIG_SYS_SPI_FLASH_U_BOOT_* macros. Given the limited places we use CONFIG_SYS_MMC_U_BOOT_OFFS (two spots, one file), remove it from CONFIG space, make it file local, and FSL_PREPBL_ESDHC_BOOT_SECTOR will be in Kconfig to start with? I'm taking a harder look at what CONFIG_SYS_* can be moved to Kconfig, and what needs to be just something else, and what can be cleaned up / removed, so I really want to figure out a solution here that migrates the symbols or removes them from CONFIG namespace. --=20 Tom --dT+85zccSFkyJC53 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmK7SFkACgkQFHw5/5Y0 tyxbQQv9FWmnNGy/U4DBtzUs5rXV4Vfh0JWpjaLZ7nJS/dOBflgv7AmXQ2nK1Bp+ Jxz5IKk1476Bt5f986HtWf6LipNdo1ZTqoB4Q75hTa2KGHnZuCX7ORyp8Flv+5Vc 7rTJqV7ITCjVxZUeWFNShCe1s8aHiNT80C+kL9q1eO79exAkoJDLRB4gOMhqNIv9 CAClTNJtCRRs6dgoamAzOi+FEOy7dFFyvUGMfOzDsEz3P2g8U/kinxqvCWaItdQs q7R5F3CfgvvxWEziem/b8+lezNPV8e5hsRDIcPFUkqlxJEO2fw0KJz/qn1hZ5s4U Jt/IHAesSlByKNAeH/Gnx9OVzf2+5soS7kQfnNkclChyw9692bdkadZD+PmqICWQ Rg35TiZxmxi1+raxwb+AbHCZnTUTfCmyNqV56wa8uRM6gAl6mDI2rU5XPm3aySfC bOyFxVBEnITC/1q3Dmo9za+sMB/I3z8IPTkXtJjhEES1puhijVBKc9lX0oyyk3Yf P5lMGEW2 =0Xyr -----END PGP SIGNATURE----- --dT+85zccSFkyJC53--