From: Tom Rini <trini@konsulko.com>
To: Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de, Adam Ford <aford173@gmail.com>,
Breno Lima <breno.lima@nxp.com>,
Francesco Montefoschi <francesco.montefoschi@udoo.org>,
Ian Ray <ian.ray@gehealthcare.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Peng Fan <peng.fan@nxp.com>, Sean Anderson <seanga2@gmail.com>,
Simon Glass <sjg@chromium.org>,
u-boot@dh-electronics.com, Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH] ARM: imx: soc: Select default TEXT_BASE for i.MX6
Date: Sun, 20 Oct 2024 14:16:15 -0600 [thread overview]
Message-ID: <20241020201615.GF4959@bill-the-cat> (raw)
In-Reply-To: <ab382b09-8e74-4c74-99e2-4188a5b16117@denx.de>
[-- Attachment #1: Type: text/plain, Size: 3751 bytes --]
On Sun, Oct 20, 2024 at 06:57:35AM +0200, Marek Vasut wrote:
> On 10/20/24 4:55 AM, Tom Rini wrote:
> > On Sun, Oct 20, 2024 at 04:25:38AM +0200, Marek Vasut wrote:
> > > On 10/20/24 2:27 AM, Tom Rini wrote:
> > > > On Sun, Oct 20, 2024 at 12:09:03AM +0200, Marek Vasut wrote:
> > > >
> > > > > Select default U-Boot and SPL text base for the i.MX6 SoC. The U-Boot
> > > > > and SPL text base is picked as the one used by various i.MX6 boards.
> > > > > Update all the boards.
> > > > >
> > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > [snip]
> > > > > diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
> > > > > index 1f8022ee685..10b19984143 100644
> > > > > --- a/arch/arm/mach-imx/mx6/Kconfig
> > > > > +++ b/arch/arm/mach-imx/mx6/Kconfig
> > > > > @@ -15,6 +15,13 @@ config MX6
> > > > > select GPT_TIMER if !MX6UL && !MX6ULL
> > > > > imply CMD_FUSE
> > > > > +config TEXT_BASE
> > > > > + default 0x17800000
> > > > > +
> > > > > +config SPL_TEXT_BASE
> > > > > + depends on SPL
> > > > > + default 0x00908000
> > > >
> > > > Please do these in Kconfig and common/spl/Kconfig with the other
> > > > SoC-wide default values, thanks.
> > > There are many examples which do it in arch/$ARCH/$SOC , imx7 does it
> > > already, so ... why Kconfig instead ?
> > >
> > > $ git grep config.TEXT_BASE
> > > Kconfig:config TEXT_BASE
> > > arch/arm/mach-apple/Kconfig:config TEXT_BASE
> > > arch/arm/mach-aspeed/Kconfig:config TEXT_BASE
> > > arch/arm/mach-imx/mx7/Kconfig:config TEXT_BASE
> > > arch/arm/mach-ipq40xx/Kconfig:config TEXT_BASE
> > > arch/arm/mach-npcm/Kconfig:config TEXT_BASE
> > > arch/arm/mach-owl/Kconfig:config TEXT_BASE
> > > arch/arm/mach-rockchip/Kconfig:config TEXT_BASE
> > > arch/arm/mach-rockchip/rk3308/Kconfig:config TEXT_BASE
> > > arch/arm/mach-rockchip/rk3568/Kconfig:config TEXT_BASE
> > > arch/arm/mach-rockchip/rk3588/Kconfig:config TEXT_BASE
> > > arch/arm/mach-rockchip/rv1126/Kconfig:config TEXT_BASE
> > > arch/arm/mach-socfpga/Kconfig:config TEXT_BASE
> > > arch/arm/mach-stm32mp/Kconfig.13x:config TEXT_BASE
> > > arch/arm/mach-stm32mp/Kconfig.15x:config TEXT_BASE
> > > arch/arm/mach-stm32mp/Kconfig.25x:config TEXT_BASE
> >
> > There are many bad examples. In general (and excluding shoving stuff
> > under board/.../Kconfig) I prefer those values to be in the top-level
> > Kconfig that asks them rather than per-arch so that it's (a) hopefully
> > clear that yes, SoCs can and should add a default when it's known and
> > (b) because perhaps this will lead to someone thinking on the problem of
> > how ugly it can be and what may be a better solution. Kconfig is
> > certainly better than CML1 was/is, and better than our ad-hoc just
> > define stuff in board.h files, but it's not perfect. OTOH, if someone
> > wants to break down the options we've put (I've told people to put) in
> > the top-level Kconfig and instead demonstrate and document a reasonable
> > places to put them, OK.
> >
> > And if you really want to say that this should just match mx7 for today
> > and move on for now, alright.
> I am happy to do it either way, but we should figure out the best practice
> ... which I was under the impression was to put architecture (or soc)
> specific default values into arch/ , while the Kconfig symbol itself should
> be in matching Kconfig somewhere else in the tree. Did this change recently
> ?
As I was trying to say, I think the best practice is in the common
Kconfig file and I've been saying that for years. But I also don't catch
when people do something else, and that frankly makes it clear that
while I think it's best, it's not obviously correct.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-10-20 20:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-19 22:09 [PATCH] ARM: imx: soc: Select default TEXT_BASE for i.MX6 Marek Vasut
2024-10-20 0:27 ` Tom Rini
2024-10-20 2:25 ` Marek Vasut
2024-10-20 2:55 ` Tom Rini
2024-10-20 4:57 ` Marek Vasut
2024-10-20 20:16 ` Tom Rini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241020201615.GF4959@bill-the-cat \
--to=trini@konsulko.com \
--cc=aford173@gmail.com \
--cc=breno.lima@nxp.com \
--cc=festevam@gmail.com \
--cc=francesco.montefoschi@udoo.org \
--cc=ian.ray@gehealthcare.com \
--cc=marcel.ziswiler@toradex.com \
--cc=marex@denx.de \
--cc=peng.fan@nxp.com \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=u-boot@dh-electronics.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.