Hi Simon, > Subject: Re: [PATCH v1] arm: global_data: add scmi pointer > > Hi Peng, > > On Mon, 7 Oct 2024 at 20:59, Peng Fan <peng....@nxp.com> wrote: > > > > > Subject: Re: [PATCH v1] arm: global_data: add scmi pointer > > > > > > On Sun, Oct 06, 2024 at 05:52:28PM +0800, > alice....@oss.nxp.com > > > wrote: > > > > From: Peng Fan <peng....@nxp.com> > > > > > > > > Add scmi device and channel pointer for i.MX9. > > > > > > > > Signed-off-by: Peng Fan <peng....@nxp.com> > > > > Signed-off-by: Alice Guo <alice....@nxp.com> > > > > Reviewed-by: Ye Li <ye...@nxp.com> > > > > --- > > > > arch/arm/include/asm/global_data.h | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > > > > > > diff --git a/arch/arm/include/asm/global_data.h > > > > b/arch/arm/include/asm/global_data.h > > > > index 45401d5e3c..d04359f167 100644 > > > > --- a/arch/arm/include/asm/global_data.h > > > > +++ b/arch/arm/include/asm/global_data.h > > > > @@ -108,6 +108,9 @@ struct arch_global_data { #ifdef > > > CONFIG_SMBIOS > > > > ulong smbios_start; /* Start address of SMBIOS > > > table */ > > > > #endif > > > > +#if defined(CONFIG_SCMI_FIRMWARE) && > defined(CONFIG_IMX9) > > > > + struct udevice *scmi_dev; > > > > +#endif > > > > }; > > > > > > > > #include <asm-generic/global_data.h> > > > > > > But why is this only needed for i.MX9 families and not other users? > > > > i.MX95 has some code that communicates with SCMI platform, but > no scmi > > driver for those code, saying rom pass info. So we need a global > > scmi_dev. > > Would it be OK to find the device using > uclass_first_device(UCLASS_SMCI) ? > > i.e. can we do without a pointer in global_data ?
It should be doable to drop the pointer. We will give a look to use the other approach. Thanks, Peng. > > If we do need it, I think it is better to have the condition just be > SCMI_FIRMWARE (and live with the extra 8 bytes in global_data). We > really should not have SoC-specific options in global_data, or even > drivers for that matter. > > Regards, > Simon > e