Hi Peng, On Mon, 7 Oct 2024 at 20:59, Peng Fan <[email protected]> wrote: > > > Subject: Re: [PATCH v1] arm: global_data: add scmi pointer > > > > On Sun, Oct 06, 2024 at 05:52:28PM +0800, [email protected] > > wrote: > > > From: Peng Fan <[email protected]> > > > > > > Add scmi device and channel pointer for i.MX9. > > > > > > Signed-off-by: Peng Fan <[email protected]> > > > Signed-off-by: Alice Guo <[email protected]> > > > Reviewed-by: Ye Li <[email protected]> > > > --- > > > 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 ? 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

