[PATCH v2 11/12] soc: starfive: Add socinfo driver for JHB100 SoC
Conor Dooley
conor at kernel.org
Wed May 13 12:16:44 PDT 2026
On Wed, May 13, 2026 at 01:01:46AM +0000, Changhuang Liang wrote:
> Hi, Conor
>
> Thanks for the review.
>
> > On Tue, May 12, 2026 at 01:35:20AM -0700, Changhuang Liang wrote:
> > > Add socinfo driver for JHB100 SoC. Currently available for
> > > distinguishing between the two reversions, A0 and A1.
> > >
> > > Signed-off-by: Changhuang Liang <changhuang.liang at starfivetech.com>
> > > ---
> > > MAINTAINERS | 5 ++
> > > drivers/soc/Kconfig | 1 +
> > > drivers/soc/Makefile | 1 +
> > > drivers/soc/starfive/Kconfig | 6 ++
> > > drivers/soc/starfive/Makefile | 2 +
> > > drivers/soc/starfive/socinfo/Kconfig | 11 +++
> > > drivers/soc/starfive/socinfo/Makefile | 2 +
> > > drivers/soc/starfive/socinfo/jhb100-socinfo.c | 80
> > > +++++++++++++++++++
> > > 8 files changed, 108 insertions(+)
> > > create mode 100644 drivers/soc/starfive/Kconfig create mode 100644
> > > drivers/soc/starfive/Makefile create mode 100644
> > > drivers/soc/starfive/socinfo/Kconfig
> > > create mode 100644 drivers/soc/starfive/socinfo/Makefile
> > > create mode 100644 drivers/soc/starfive/socinfo/jhb100-socinfo.c
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS index
> > > 6f6aac7cea95..66175f453d20 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -25613,6 +25613,11 @@ S: Maintained
> > > F: drivers/reset/starfive/reset-starfive-jhb1*
> > > F: include/dt-bindings/reset/starfive,jhb1*.h
> > >
> > > +STARFIVE JHB100 SOCINFO DRIVER
> > > +M: Changhuang Liang <changhuang.liang at starfivetech.com>
> > > +S: Maintained
> > > +F: drivers/soc/starfive/
> >
> > FWIW, this is not what I asked for in v1, this should remain the full path to the
> > driver. I wanted you to add this directory back to the "STARFIVE SOC
> > DRIVERS" entry, since it's me that'll be applying patches for this driver.
>
> Sorry, I misunderstood what you meant.
>
> >
> > > +
> > > STARFIVE JHB100 SYSCON
> > > M: Changhuang Liang <changhuang.liang at starfivetech.com>
> > > S: Maintained
> > > diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig index
> > > a2d65adffb80..b3b01fc38139 100644
> > > --- a/drivers/soc/Kconfig
> > > +++ b/drivers/soc/Kconfig
> > > @@ -24,6 +24,7 @@ source "drivers/soc/renesas/Kconfig"
> > > source "drivers/soc/rockchip/Kconfig"
> > > source "drivers/soc/samsung/Kconfig"
> > > source "drivers/soc/sophgo/Kconfig"
> > > +source "drivers/soc/starfive/Kconfig"
> > > source "drivers/soc/sunxi/Kconfig"
> > > source "drivers/soc/tegra/Kconfig"
>
> [...]
>
> > > + pr_info("StarFive %s SoC rev(%s)\n", attrs->soc_id,
> > > +attrs->revision);
> > > +
> > > + return 0;
> > > +}
> > > +
> > > +early_initcall(starfive_socinfo_init);
> >
> > Does this really need to be an early initcall btw?
>
> Yes, there are some drivers that need to use soc_device_match() to match different
> revisions, in order to handle the processes caused by differences between revisions.
> So there's no harm in initializing this driver earlier.
Other socinfo drivers use device_initcall, can you use that instead?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260513/dd42c73b/attachment.sig>
More information about the linux-riscv
mailing list