[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZORpPYYczxRN_wuI@orome>
Date: Tue, 22 Aug 2023 09:52:29 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Kartik <kkartik@...dia.com>, arnd@...db.de, digetx@...il.com,
frank.li@...o.com, jonathanh@...dia.com,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
pdeschrijver@...dia.com, petlozup@...dia.com, pshete@...dia.com,
robh@...nel.org, stefank@...dia.com, sumitg@...dia.com,
windhl@....com
Subject: Re: [PATCH 1/6] soc/tegra: fuse: Add tegra_acpi_init_apbmisc()
On Mon, Aug 21, 2023 at 03:32:41PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 21, 2023 at 05:02:20PM +0530, Kartik wrote:
> > On Fri, 2023-08-18 at 16:21 +0300, Andy Shevchenko wrote:
>
> ...
>
> > >> void tegra_init_revision(void);
> > >> void tegra_init_apbmisc(void);
> > >> +void tegra_acpi_init_apbmisc(void);
> > >
> > >Why do you need a separate function?
> >
> > Function tegra_init_apbmisc() is called from tegra_init_fuse() which
> > is invoked at early init and it also has `__init` keyword. If we use
> > the same function for both ACPI/DT, then we will get init section
> > mismatches when the Tegra Fuse driver probes using ACPI.
> >
> > We can use the same function by dropping the `init` keyword. But
> > the way we are getting the resources for device-tree and on ACPI is
> > slightly different. Hence, I kept a separate function for ACPI
> > and move the common bits to a function shared between
> > tegra_init_apbmisc() and tegra_acpi_init_apbmisc().
>
> So, you mean that behaviour is different for ACPI and DT cases.
> Then obvious question why DT case can't be delayed to not so early
> stage to be run? This requires some explanations, more than given
> in the commit message and here.
We've done some experiments in the past to unify this and unfortunately
we can't. The reason is that some of the old 32-bit ARM code needs some
information from the APBMISC registers very early during boot (among
other things for SMP support), so delaying this doesn't work.
I agree that it would be good to put this into some comment for later
reference.
Thierry
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists