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 D11A0CCA47E for ; Tue, 28 Jun 2022 18:39:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 41B89842DF; Tue, 28 Jun 2022 20:39:19 +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="QUbcNRvR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7739984462; Tue, 28 Jun 2022 20:39:18 +0200 (CEST) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (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 AA893842DF for ; Tue, 28 Jun 2022 20:39:15 +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-qv1-xf36.google.com with SMTP id o43so21383013qvo.4 for ; Tue, 28 Jun 2022 11:39:15 -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=JYnotpvGLzo311XGfoQIMJBsIVbXOMIwBGPkkqi1oa0=; b=QUbcNRvRUIVVRCNi5ZMA5LC3y8EMBDop4zHBgjDSBO+uBCs0PQv9QO2JrXm0m3kYKH umP5oXP0bsU/RGEb/Nn/a2Hnsn28uDF9AAz9yIJaAWofrY3dybEkhpFUucxXInl57KmR XhV/RfQZeCZyQDrQGkm2MU+R54BcXD4TY6NTI= 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=JYnotpvGLzo311XGfoQIMJBsIVbXOMIwBGPkkqi1oa0=; b=0yPcS5o9vPDUBMY8S4XGTKvDixf7ExvE/vkvM0nNbHkQGQR1j/TSPyBzXlAIsLtyM6 Z4le81pUKHIXyS4XkjDOkA4HOoTJEei7YXwmoACfBod8EL9Tg9UIAiJ9rKjuvSPsrBmb GAbMox+50H8XZRtMFDgvtif4VD/8j3DUE4nOi5tLgAF4/V91beumk7pCQonb/LeX1p0y Tl4cyISfXcQX6D+vPRnwWChitxPDUQh71ELFyf8wF0qxL7Qpe+trE7asz1KfpwbPOdZl z+8xS9XXwF3Fd33i2+dNeFWSNBkgkFTNSHp7L2lGVMsBmV+1mfhcPONHG2Ko+DiaziB6 cYzA== X-Gm-Message-State: AJIora/N82T+UZsLCYPLLpOdoL3njpbrQRNr/oV1afKPhWnsXgfeaLbb qJjoEoC79cZyu3Fl2BjvgMJFlA== X-Google-Smtp-Source: AGRyM1uxDnBztimv/R0Z1jj1gwjstpo6YwFaUDawj/d6zEO9VjEDUhspUEEb+mM7eXCTrQomxbPfFA== X-Received: by 2002:a05:6214:1cc8:b0:46e:1920:70f8 with SMTP id g8-20020a0562141cc800b0046e192070f8mr4873979qvd.6.1656441554480; Tue, 28 Jun 2022 11:39:14 -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 s24-20020ac85ed8000000b00317c519be8bsm9309435qtx.66.2022.06.28.11.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 11:39:13 -0700 (PDT) Date: Tue, 28 Jun 2022 14:39:11 -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: <20220628183911.GQ1146598@bill-the-cat> References: <20220405131237.405-9-pali@kernel.org> <20220628175355.27817-1-pali@kernel.org> <20220628181742.GO1146598@bill-the-cat> <20220628182238.cmjhgpidicikyubo@pali> <20220628182852.GP1146598@bill-the-cat> <20220628183447.xnzwjxxnlabpf7on@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4dIe/AmYstFUGHTF" Content-Disposition: inline In-Reply-To: <20220628183447.xnzwjxxnlabpf7on@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 --4dIe/AmYstFUGHTF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 28, 2022 at 08:34:47PM +0200, Pali Roh=E1r wrote: > On Tuesday 28 June 2022 14:28:52 Tom Rini wrote: > > 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 calculat= ion of > > > > > other SPL offset values: CONFIG_SPL_MAX_SIZE, CONFIG_SYS_MMC_U_BO= OT_* 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 d61c11b8c894fa= d517677dc51ee82d1eade39c01 > > > > > --- > > > > > 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_rdb_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 abo= ve? > > > > 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= -pali@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. > >=20 > > 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 > > --=20 > > Tom >=20 > More than month ago I proposed different solution, prepare codebase to > completely drop CONFIG_SYS_MMC_U_BOOT_OFFS option. But nobody reacted to > it and now I see on patchwork just "Changes Requested". > https://patchwork.ozlabs.org/project/uboot/patch/20220511183332.1362-2-pa= li@kernel.org/ Er, I see https://patchwork.ozlabs.org/project/uboot/patch/20220511183332.1362-1-pali= @kernel.org/ notes it fails to build, so that's probably the changes requested. --=20 Tom --4dIe/AmYstFUGHTF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmK7SswACgkQFHw5/5Y0 tyzPAwwAsHsRXdT3UM/uAlZjvsfwfHMgT479GJW6qMfH0+DOMgtep26G7fy8hD9Y SRCa8uHsPE9RGEzcC1/dkkMNHdwY1aaP6pl0ZBe81Pn9CiaDEqvFhxzx5/OzFfau ofHLzWPplZL47zKQ3LMFZV9B6R6YMRHcmUG0erldh+0U98fPlyCkqJXyxlnHbmIF 001vPu8e/ow7xWQFePY5U8NMfdhZeVR1LAWzniLgEzzEia74nGXiy9pYw8qoTgp1 vqDQdMa7y5b6/8vMFq0gBCgA6lwBFtVR0gnCkL7XWF6sVs5EX/Mkj3klphs3s2fK 9SVkjzlE094qF9h7JLAGTTLLUUL07VXMG9CR0vzbA6ZuHGWUjGFGmtTm5yJzC1Kv B8Wwm5ODiiTjyoKAD+N+zH5YvE0vnYmcTyFIxYJbU+PAwmSYDmTw/4XU/c9Lp29u 0eaGMBmu7+/jevAUtrqMHUcoPVEUBYRORspxH+Y1NqlVkc5AteSVRQopp2E33jTV NPpfynoH =ojAh -----END PGP SIGNATURE----- --4dIe/AmYstFUGHTF--