From: Nicolas Frayer <nfrayer@baylibre.com>
To: nm@ti.com, ssantosh@kernel.org
Cc: linux-arm-kernel@lists.infradead.org, khilman@baylibre.com,
glaroque@baylibre.com, granquet@baylibre.com,
Nicolas Frayer <nfrayer@baylibre.com>
Subject: [PATCH v2 2/2] soc: ti: Add module build support
Date: Mon, 10 Oct 2022 15:15:38 +0200 [thread overview]
Message-ID: <20221010131538.7333-3-nfrayer@baylibre.com> (raw)
In-Reply-To: <20221010131538.7333-1-nfrayer@baylibre.com>
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-10 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 13:15 [PATCH v2 0/2] soc: ti: Convert K3 SoC info driver to module Nicolas Frayer
2022-10-10 13:15 ` [PATCH v2 1/2] soc: ti: Convert allocations to devm Nicolas Frayer
2022-10-17 22:15 ` Nishanth Menon
2022-10-19 17:50 ` Nicolas Frayer
2022-10-19 17:58 ` Nicolas Frayer
2022-10-10 13:15 ` Nicolas Frayer [this message]
2022-10-10 16:40 ` [PATCH v2 2/2] soc: ti: Add module build support Nicolas Frayer
2022-10-17 22:16 ` Nishanth Menon
2022-10-19 17:57 ` Nicolas Frayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221010131538.7333-3-nfrayer@baylibre.com \
--to=nfrayer@baylibre.com \
--cc=glaroque@baylibre.com \
--cc=granquet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nm@ti.com \
--cc=ssantosh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox