Skip to contentSkip to conversation

soc: nuvoton: Add SoC info driver for WPCM450

PATCH Superseded Jonathan Neuschäfer 1 participant 1 message Apr 15, 2022 Arm/nuvoton WPCM450 architecture

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Jonathan Neuschäfer

author maintainer
#0 lore raw

PATCH v3 1/1 soc: nuvoton: Add SoC info driver for WPCM450

Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.

Usage example:

  # grep . /sys/devices/soc0/*
  /sys/devices/soc0/family:Nuvoton NPCM
  /sys/devices/soc0/revision:A3
  /sys/devices/soc0/soc_id:WPCM450

---
v3:
- Declare revisions array as static
- Change get_revision parameter to unsigned int
- Add Paul's R-b tag
- Add usage example
- Sort includes

v2:
- https://lore.kernel.org/lkml/[email protected]/
- Add R-b tag
- rebase on 5.18-rc1

v1:
- https://lore.kernel.org/lkml/[email protected]/

---
 drivers/soc/Kconfig               |  1 +
 drivers/soc/Makefile              |  1 +
 drivers/soc/nuvoton/Kconfig       | 11 ++++
 drivers/soc/nuvoton/Makefile      |  2 +
 drivers/soc/nuvoton/wpcm450-soc.c | 90 +++++++++++++++++++++++++++++++
 5 files changed, 105 insertions(+)
 create mode 100644 drivers/soc/nuvoton/Kconfig
 create mode 100644 drivers/soc/nuvoton/Makefile
 create mode 100644 drivers/soc/nuvoton/wpcm450-soc.c
drivers/soc/Kconfig +1 -0
index c5aae42673d3b..42a5e0be77f3d 100644
@@ -14,6 +14,7 @@ source "drivers/soc/ixp4xx/Kconfig"
 source "drivers/soc/litex/Kconfig"
 source "drivers/soc/mediatek/Kconfig"
 source "drivers/soc/microchip/Kconfig"
+source "drivers/soc/nuvoton/Kconfig"
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/renesas/Kconfig"
 source "drivers/soc/rockchip/Kconfig"
drivers/soc/Makefile +1 -0
index 904eec2a78713..3239fc49eeb27 100644
@@ -19,6 +19,7 @@ obj-$(CONFIG_SOC_XWAY)		+= lantiq/
 obj-$(CONFIG_LITEX_SOC_CONTROLLER) += litex/
 obj-y				+= mediatek/
 obj-y				+= microchip/
+obj-y				+= nuvoton/
 obj-y				+= amlogic/
 obj-y				+= qcom/
 obj-y				+= renesas/
drivers/soc/nuvoton/Kconfig new file +11 -0
new file mode 100644
index 0000000000000..50166f37096b7
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0
+menuconfig WPCM450_SOC
+	bool "Nuvoton WPCM450 SoC driver"
+	default y if ARCH_WPCM450
+	select SOC_BUS
+	help
+	  Say Y here to compile the SoC information driver for Nuvoton
+	  WPCM450 SoCs.
+
+	  This driver provides information such as the SoC model and
+	  revision.
drivers/soc/nuvoton/Makefile new file +2 -0
new file mode 100644
index 0000000000000..e30317b4e8290
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_WPCM450_SOC)	+= wpcm450-soc.o
drivers/soc/nuvoton/wpcm450-soc.c new file +90 -0

90 lines not on this page · raw message

--
2.35.1