Skip to content

Commit

Permalink
soc: ti: Add module build support
Browse files Browse the repository at this point in the history
Added module build support for the TI K3 SoC info driver.

Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com>
  • Loading branch information
Nicolas Frayer authored and intel-lab-lkp committed Nov 8, 2022
1 parent 2a69a08 commit a96844c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion arch/arm64/Kconfig.platforms
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,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.
Expand Down
3 changes: 2 additions & 1 deletion drivers/soc/ti/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,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
Expand Down
11 changes: 11 additions & 0 deletions drivers/soc/ti/k3-socinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand Down Expand Up @@ -141,6 +142,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 = {
Expand All @@ -156,3 +158,12 @@ static int __init k3_chipinfo_init(void)
return platform_driver_register(&k3_chipinfo_driver);
}
subsys_initcall(k3_chipinfo_init);

static void __exit k3_chipinfo_exit(void)
{
platform_driver_unregister(&k3_chipinfo_driver);
}
module_exit(k3_chipinfo_exit);

MODULE_DESCRIPTION("TI K3 SoC info driver");
MODULE_LICENSE("GPL");

0 comments on commit a96844c

Please sign in to comment.