Message ID | 20221010131538.7333-3-nfrayer@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | soc: ti: Convert K3 SoC info driver to module | expand |
Le lun. 10 oct. 2022 à 15:15, Nicolas Frayer <nfrayer@baylibre.com> a écrit : > > Added module build support for the TI K3 SoC info driver. > > Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com> > --- > arch/arm64/Kconfig.platforms | 1 - > drivers/soc/ti/Kconfig | 3 ++- > drivers/soc/ti/k3-socinfo.c | 11 ++++++----- > 3 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms > index 889e78f40a25..31b628fdd4b1 100644 > --- a/arch/arm64/Kconfig.platforms > +++ b/arch/arm64/Kconfig.platforms > @@ -112,7 +112,6 @@ config ARCH_K3 > select TI_SCI_PROTOCOL > select TI_SCI_INTR_IRQCHIP > select TI_SCI_INTA_IRQCHIP > - select TI_K3_SOCINFO > help > This enables support for Texas Instruments' K3 multicore SoC > architecture. > diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig > index 56c41eac33f8..a10bea0cdf90 100644 > --- a/drivers/soc/ti/Kconfig > +++ b/drivers/soc/ti/Kconfig > @@ -85,7 +85,8 @@ config TI_K3_RINGACC > If unsure, say N. > > config TI_K3_SOCINFO > - bool > + tristate "TI K3 SoC info driver" > + default y > depends on ARCH_K3 || COMPILE_TEST > select SOC_BUS > select MFD_SYSCON > diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c > index 3311797145ed..dd275f338e06 100644 > --- a/drivers/soc/ti/k3-socinfo.c > +++ b/drivers/soc/ti/k3-socinfo.c > @@ -13,6 +13,7 @@ > #include <linux/slab.h> > #include <linux/string.h> > #include <linux/sys_soc.h> > +#include <linux/module.h> > > #define CTRLMMR_WKUP_JTAGID_REG 0 > /* > @@ -142,6 +143,7 @@ static const struct of_device_id k3_chipinfo_of_match[] = { > { .compatible = "ti,am654-chipid", }, > { /* sentinel */ }, > }; > +MODULE_DEVICE_TABLE(of, k3_chipinfo_of_match); > > static struct platform_driver k3_chipinfo_driver = { > .driver = { > @@ -152,8 +154,7 @@ static struct platform_driver k3_chipinfo_driver = { > .remove = k3_chipinfo_remove, > }; > > -static int __init k3_chipinfo_init(void) > -{ > - return platform_driver_register(&k3_chipinfo_driver); > -} > -subsys_initcall(k3_chipinfo_init); > +module_platform_driver(k3_chipinfo_driver); > + > +MODULE_DESCRIPTION("TI K3 SoC info driver"); > +MODULE_LICENSE("GPL v2"); > -- > 2.25.1 > [Resending without the HTML formatting] Please do not merge this patch. A dependency issue is introduced by changing subsys_initcall() to module_platform_driver(). Some drivers using the socinfo information probe before the socinfo driver itself and it makes their probes fail. However, the first patch of this serie can be merged.
On 15:15-20221010, Nicolas Frayer wrote: > Added module build support for the TI K3 SoC info driver. > > Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com> > --- [...] > diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c > index 3311797145ed..dd275f338e06 100644 > --- a/drivers/soc/ti/k3-socinfo.c > +++ b/drivers/soc/ti/k3-socinfo.c [...] > + > +MODULE_DESCRIPTION("TI K3 SoC info driver"); > +MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL"); ?
Le mar. 18 oct. 2022 à 00:16, Nishanth Menon <nm@ti.com> a écrit : > > On 15:15-20221010, Nicolas Frayer wrote: > > Added module build support for the TI K3 SoC info driver. > > > > Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com> > > --- > [...] > > > diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c > > index 3311797145ed..dd275f338e06 100644 > > --- a/drivers/soc/ti/k3-socinfo.c > > +++ b/drivers/soc/ti/k3-socinfo.c > > [...] > > > + > > +MODULE_DESCRIPTION("TI K3 SoC info driver"); > > +MODULE_LICENSE("GPL v2"); > > MODULE_LICENSE("GPL"); > > ? > > > -- > Regards, > Nishanth Menon > Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D Thanks, I used GPL v2 as the top banner in the file specified GPL-v2. I will use GPL when I resend this patch after the probe dependency issues are solved for drivers using socinfo attr.
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 889e78f40a25..31b628fdd4b1 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -112,7 +112,6 @@ config ARCH_K3 select TI_SCI_PROTOCOL select TI_SCI_INTR_IRQCHIP select TI_SCI_INTA_IRQCHIP - select TI_K3_SOCINFO help This enables support for Texas Instruments' K3 multicore SoC architecture. diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig index 56c41eac33f8..a10bea0cdf90 100644 --- a/drivers/soc/ti/Kconfig +++ b/drivers/soc/ti/Kconfig @@ -85,7 +85,8 @@ config TI_K3_RINGACC If unsure, say N. config TI_K3_SOCINFO - bool + tristate "TI K3 SoC info driver" + default y depends on ARCH_K3 || COMPILE_TEST select SOC_BUS select MFD_SYSCON diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c index 3311797145ed..dd275f338e06 100644 --- a/drivers/soc/ti/k3-socinfo.c +++ b/drivers/soc/ti/k3-socinfo.c @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/string.h> #include <linux/sys_soc.h> +#include <linux/module.h> #define CTRLMMR_WKUP_JTAGID_REG 0 /* @@ -142,6 +143,7 @@ static const struct of_device_id k3_chipinfo_of_match[] = { { .compatible = "ti,am654-chipid", }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, k3_chipinfo_of_match); static struct platform_driver k3_chipinfo_driver = { .driver = { @@ -152,8 +154,7 @@ static struct platform_driver k3_chipinfo_driver = { .remove = k3_chipinfo_remove, }; -static int __init k3_chipinfo_init(void) -{ - return platform_driver_register(&k3_chipinfo_driver); -} -subsys_initcall(k3_chipinfo_init); +module_platform_driver(k3_chipinfo_driver); + +MODULE_DESCRIPTION("TI K3 SoC info driver"); +MODULE_LICENSE("GPL v2");
Added module build support for the TI K3 SoC info driver. Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com> --- arch/arm64/Kconfig.platforms | 1 - drivers/soc/ti/Kconfig | 3 ++- drivers/soc/ti/k3-socinfo.c | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-)