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 CB5CFC433EF for ; Tue, 28 Jun 2022 19:14:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4EB3842E2; Tue, 28 Jun 2022 21:14:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="kb7wPyBO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE8C8843E6; Tue, 28 Jun 2022 21:14:03 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 A677383EF2 for ; Tue, 28 Jun 2022 21:14:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 230E1B81DFC; Tue, 28 Jun 2022 19:14:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 910D8C341C6; Tue, 28 Jun 2022 19:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656443638; bh=nTSaheEx0SgWKg7hZ7ZpcoTAHAc47OTG1LCTaI4kAT4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kb7wPyBOKLQ6Hwjz7RMTN8kYGOmo3kjgxWppLZarA5wJ44vJhc2JhrxDiN4jj83V2 sxXgseCUlXN+aZmvClb4dU8nEJEt0bty+eEDnNPSeftAcQLRqZ5i13lGrDoBaTkrMp VtRmD/JWsHv87ZGLVSK2DTM4kBZpm2b9LYhAS3i9+crIE95xP2Pt2idsEVH/9bZd/6 qz11JGdGN9QH4RHOMRLPaZLgmi/fivCBGwZgSiaWiOKfPOwyI18OR7dGDONlL1CzIf +Kit8hH0RR9jTBwhzrSPBLTjumwGX+ML9ijV2CBGxh6KCN0kA3Z13hsjWgRJHL0xNT NSPfTe7bsc/IA== Received: by pali.im (Postfix) id A40C27AE; Tue, 28 Jun 2022 21:13:55 +0200 (CEST) Date: Tue, 28 Jun 2022 21:13:55 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini 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: <20220628191355.xusgzcdtna54nels@pali> References: <20220628175355.27817-1-pali@kernel.org> <20220628181742.GO1146598@bill-the-cat> <20220628182238.cmjhgpidicikyubo@pali> <20220628182852.GP1146598@bill-the-cat> <20220628183447.xnzwjxxnlabpf7on@pali> <20220628183911.GQ1146598@bill-the-cat> <20220628184144.5rygvzdznwgyb44j@pali> <20220628185326.GR1146598@bill-the-cat> <20220628185848.jelsy7xq2pn56cq7@pali> <20220628190857.GS1146598@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220628190857.GS1146598@bill-the-cat> User-Agent: NeoMutt/20180716 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 On Tuesday 28 June 2022 15:08:57 Tom Rini wrote: > On Tue, Jun 28, 2022 at 08:58:48PM +0200, Pali Rohár wrote: > > On Tuesday 28 June 2022 14:53:26 Tom Rini wrote: > > > On Tue, Jun 28, 2022 at 08:41:44PM +0200, Pali Rohár wrote: > > > > On Tuesday 28 June 2022 14:39:11 Tom Rini wrote: > > > > > On Tue, Jun 28, 2022 at 08:34:47PM +0200, Pali Rohár wrote: > > > > > > On Tuesday 28 June 2022 14:28:52 Tom Rini wrote: > > > > > > > On Tue, Jun 28, 2022 at 08:22:38PM +0200, Pali Rohár wrote: > > > > > > > > On Tuesday 28 June 2022 14:17:42 Tom Rini wrote: > > > > > > > > > On Tue, Jun 28, 2022 at 07:53:55PM +0200, Pali Rohár wrote: > > > > > > > > > > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > > > > No functional change. > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pali Rohár > > > > > > > > > > --- > > > > > > > > > > Changes in v2: > > > > > > > > > > * Rebased on top of the U-Boot next branch, commit d61c11b8c894fad517677dc51ee82d1eade39c01 > > > > > > > > > > --- > > > > > > > > > > include/configs/p1_p2_rdb_pc.h | 12 ++++++------ > > > > > > > > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > > > > > > > > > > > > > > > > > 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 @@ > > > > > > > > > > > > > > > > > > > > #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 > > > > > > > > > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Tom > > > > > > > > > > > > > > > > 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/ > > > > > > > > > > > > > > > > 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. > > > > > > > > > > > > > > -- > > > > > > > Tom > > > > > > > > > > > > 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-pali@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. > > > > > > > > > > -- > > > > > Tom > > > > > > > > V2 for that build failure already exists and half hour ago I sent > > > > another reminder for v2: > > > > https://lore.kernel.org/u-boot/20220628181436.iwmwvvoithgwp6pu@pali/ > > > > but it has nothing with CONFIG_SYS_MMC_U_BOOT_OFFS... > > > > > > Patch 1/3 in the series causes fails to build errors, the whole series > > > gets changes requested, that's normal to me and expecting the whole > > > series to be reposted. > > > > See the previous link. I have already rebased and resent first patch as v2. > > Yes, that's my point. You should have resent the whole series, not just > that first patch. Why? Well, this feels like we're getting back to the > state much of the N900 patches got to where it was really hard for > Lokesh, or myself, to figure out the correct order to apply N patches > in, with some of them having been reposted / rebased and others > depending on those patches. The v2 you link above isn't "v2 1/3", but > just "v2". So, reposting the whole series is preferred. > > -- > Tom Well, for last month, I'm just asked to rebase and rebase patches. I really do not want to do another useless job (= rebase patch which would be needed to rebase again in next moth). And so I'm not going to rebase & send whole patch series which take me lot of time. So I in this case I just rebased and resent only the first patch from that patch series and once it will be processed and I will look at other patches, one by one.