]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
reset: Create subdirectory for SpacemiT drivers
authorGuodong Xu <guodong@riscstar.com>
Tue, 20 Jan 2026 11:10:50 +0000 (19:10 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Sat, 24 Jan 2026 15:53:02 +0000 (16:53 +0100)
Create a dedicated subdirectory for SpacemiT reset drivers to allow
for better organization as support for more SoCs is added.

Move the existing K1 reset driver into this new directory and rename
it to reset-spacemit-k1.c.

Rename the Kconfig symbol to RESET_SPACEMIT_K1 and update its default
from ARCH_SPACEMIT to SPACEMIT_K1_CCU. The reset driver depends on the
clock driver to register reset devices as an auxiliary device, so the
default should reflect this dependency.

Also sort the drivers/reset/Kconfig entries alphabetically.

Reviewed-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://lore.kernel.org/spacemit/20260114092742-GYC7933267@gentoo.org/
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/Kconfig
drivers/reset/Makefile
drivers/reset/spacemit/Kconfig [new file with mode: 0644]
drivers/reset/spacemit/Makefile [new file with mode: 0644]
drivers/reset/spacemit/reset-spacemit-k1.c [moved from drivers/reset/reset-spacemit.c with 100% similarity]

index 52ee102621eef131922b7589bdbaaaab04e73a6b..7ce151f6a7e4d675f8556e8595c77fc2ce0bcd1b 100644 (file)
@@ -299,15 +299,6 @@ config RESET_SOCFPGA
          This enables the reset driver for the SoCFPGA ARMv7 platforms. This
          driver gets initialized early during platform init calls.
 
-config RESET_SPACEMIT
-       tristate "SpacemiT reset driver"
-       depends on ARCH_SPACEMIT || COMPILE_TEST
-       select AUXILIARY_BUS
-       default ARCH_SPACEMIT
-       help
-         This enables the reset controller driver for SpacemiT SoCs,
-         including the K1.
-
 config RESET_SUNPLUS
        bool "Sunplus SoCs Reset Driver" if COMPILE_TEST
        default ARCH_SUNPLUS
@@ -406,9 +397,10 @@ config RESET_ZYNQMP
          This enables the reset controller driver for Xilinx ZynqMP SoCs.
 
 source "drivers/reset/amlogic/Kconfig"
+source "drivers/reset/hisilicon/Kconfig"
+source "drivers/reset/spacemit/Kconfig"
 source "drivers/reset/starfive/Kconfig"
 source "drivers/reset/sti/Kconfig"
-source "drivers/reset/hisilicon/Kconfig"
 source "drivers/reset/tegra/Kconfig"
 
 endif
index 9c3e484dfd81a4f7b2f156a6226d5fa233600f9f..fc0cc99f8514cac161af59389ba1cbd5490209c8 100644 (file)
@@ -2,6 +2,7 @@
 obj-y += core.o
 obj-y += amlogic/
 obj-y += hisilicon/
+obj-y += spacemit/
 obj-y += starfive/
 obj-y += sti/
 obj-y += tegra/
@@ -38,7 +39,6 @@ obj-$(CONFIG_RESET_RZV2H_USB2PHY) += reset-rzv2h-usb2phy.o
 obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
 obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
-obj-$(CONFIG_RESET_SPACEMIT) += reset-spacemit.o
 obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_RESET_TH1520) += reset-th1520.o
diff --git a/drivers/reset/spacemit/Kconfig b/drivers/reset/spacemit/Kconfig
new file mode 100644 (file)
index 0000000..552884e
--- /dev/null
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config RESET_SPACEMIT_K1
+       tristate "SpacemiT K1 reset driver"
+       depends on ARCH_SPACEMIT || COMPILE_TEST
+       depends on SPACEMIT_K1_CCU
+       select AUXILIARY_BUS
+       default SPACEMIT_K1_CCU
+       help
+         Support for reset controller in SpacemiT K1 SoC.
+         This driver works with the SpacemiT K1 clock controller
+         unit (CCU) driver to provide reset control functionality
+         for various peripherals and subsystems in the SoC.
+
diff --git a/drivers/reset/spacemit/Makefile b/drivers/reset/spacemit/Makefile
new file mode 100644 (file)
index 0000000..34e3350
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_RESET_SPACEMIT_K1)                += reset-spacemit-k1.o