[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB8459AE5010282F9A6DB4456988C5A@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Wed, 5 Nov 2025 15:48:47 +0000
From: Peng Fan <peng.fan@....com>
To: Sebin Francis <sebin.francis@...com>, Michael Turquette
<mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Sudeep Holla <sudeep.holla@....com>, Cristian Marussi
<cristian.marussi@....com>, Brian Masney <bmasney@...hat.com>, Vignesh R
<vigneshr@...com>
CC: Dan Carpenter <dan.carpenter@...aro.org>, Geert Uytterhoeven
<geert@...ux-m68k.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-clk@...r.kernel.org"
<linux-clk@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "arm-scmi@...r.kernel.org"
<arm-scmi@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v5 6/6] clk: scmi: Add i.MX95 OEM extension support for
SCMI clock driver
Hi Sebin,
> Subject: Re: [PATCH v5 6/6] clk: scmi: Add i.MX95 OEM extension
> support for SCMI clock driver
>
> Hi Peng,
>
> On 09/10/25 09:18, Peng Fan wrote:
> > - Introduce 'clk-scmi-oem.c' to support vendor-specific OEM
> extensions
> > for the SCMI clock driver, allows clean integration of vendor-
> specific
> > features without impacting the core SCMI clock driver logic.
> > - Extend 'clk-scmi.h' with 'scmi_clk_oem' structure and related
> declarations.
> > - Initialize OEM extensions via 'scmi_clk_oem_init()'.
> > - Support querying OEM-specific features and setting spread
> spectrum.
> > - Pass 'scmi_device' to 'scmi_clk_ops_select()' for OEM data access.
> >
> > Signed-off-by: Peng Fan <peng.fan@....com>
>
> Thanks for the patch. I only have a minor comment, otherwise the
> patch looks good.
>
> [...]
>
> > +
> > +int scmi_clk_oem_init(struct scmi_device *sdev) {
> > + const struct scmi_handle *handle = sdev->handle;
> > + int i, size = ARRAY_SIZE(info);
> > +
> > + for (i = 0; i < size; i++) {
> > + if (strcmp(handle->version->vendor_id,
> SCMI_IMX_VENDOR) ||
> > + strcmp(handle->version->sub_vendor_id,
> SCMI_IMX_SUBVENDOR))
> > + continue;
> > + if (info[i].compatible &&
> > + !of_machine_is_compatible(info[i].compatible))
> > + continue;
> > +
> > + break;
> > + }
> > +
> > + if (i < size)
> > + dev_set_drvdata(&sdev->dev, (void *)info[i].data);
> > +
> > + return 0;
> > +}
>
> This above logic is tailor made for IMX is it possible to make it generic?
Yeah. I will update it. It should compare with each entry in
const struct scmi_clk_oem_info info[] = {
{ SCMI_IMX_VENDOR, SCMI_IMX_SUBVENDOR, NULL, &scmi_clk_oem_imx },
};
To TI, I think it could be extended to
+const struct scmi_clk_oem_info info[] = {
+ { SCMI_IMX_VENDOR, SCMI_IMX_SUBVENDOR, NULL, &scmi_clk_oem_imx },
+ { SCMI_TI_VENDOR, SCMI_TI_SUBVENDOR, NULL, &scmi_clk_oem_ti },
+};
Regards
Peng.
>
> > diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c index
> >
> bf85924d61985eb9e596419349eb883e3817de73..1ed2091e3d4a951
> c8662db4c94de
> > e4b9c98b8326 100644
> > --- a/drivers/clk/clk-scmi.c
> > +++ b/drivers/clk/clk-scmi.c
> > @@ -14,6 +14,8 @@
> > #include <linux/scmi_protocol.h>
> > #include <asm/div64.h>
> >
> > +#include "clk-scmi.h"
>
> [...]
>
>
> Thanks
> Sebin
Powered by blists - more mailing lists