[U-Boot] [PATCH v2] drivers/sysreset: group sysreset drivers

Max Filippov jcmvbkbc at gmail.com
Sun Aug 7 07:53:00 CEST 2016


Create drivers/sysreset and move sysreset-uclass and all sysreset
drivers there.

Signed-off-by: Max Filippov <jcmvbkbc at gmail.com>
---
Changes v1->v2:
- move RK3399 sysreset driver as well;
- format patch with -M to make renames explicit.
---
 arch/arm/mach-rockchip/rk3036/Makefile                   |  1 -
 arch/arm/mach-rockchip/rk3288/Makefile                   |  1 -
 arch/arm/mach-rockchip/rk3399/Makefile                   |  1 -
 arch/arm/mach-snapdragon/Makefile                        |  1 -
 drivers/Kconfig                                          |  2 ++
 drivers/Makefile                                         |  3 ++-
 drivers/misc/Kconfig                                     |  9 ---------
 drivers/misc/Makefile                                    |  2 --
 drivers/sysreset/Kconfig                                 | 16 ++++++++++++++++
 drivers/sysreset/Makefile                                | 15 +++++++++++++++
 drivers/{misc => sysreset}/sysreset-uclass.c             |  0
 .../reset_rk3036.c => drivers/sysreset/sysreset_rk3036.c |  0
 .../reset_rk3288.c => drivers/sysreset/sysreset_rk3288.c |  0
 .../reset_rk3399.c => drivers/sysreset/sysreset_rk3399.c |  0
 drivers/{misc => sysreset}/sysreset_sandbox.c            |  0
 .../reset.c => drivers/sysreset/sysreset_snapdragon.c    |  0
 16 files changed, 35 insertions(+), 16 deletions(-)
 create mode 100644 drivers/sysreset/Kconfig
 create mode 100644 drivers/sysreset/Makefile
 rename drivers/{misc => sysreset}/sysreset-uclass.c (100%)
 rename arch/arm/mach-rockchip/rk3036/reset_rk3036.c => drivers/sysreset/sysreset_rk3036.c (100%)
 rename arch/arm/mach-rockchip/rk3288/reset_rk3288.c => drivers/sysreset/sysreset_rk3288.c (100%)
 rename arch/arm/mach-rockchip/rk3399/reset_rk3399.c => drivers/sysreset/sysreset_rk3399.c (100%)
 rename drivers/{misc => sysreset}/sysreset_sandbox.c (100%)
 rename arch/arm/mach-snapdragon/reset.c => drivers/sysreset/sysreset_snapdragon.c (100%)

diff --git a/arch/arm/mach-rockchip/rk3036/Makefile b/arch/arm/mach-rockchip/rk3036/Makefile
index 6095777..916a7a4 100644
--- a/arch/arm/mach-rockchip/rk3036/Makefile
+++ b/arch/arm/mach-rockchip/rk3036/Makefile
@@ -5,7 +5,6 @@
 #
 
 ifndef CONFIG_SPL_BUILD
-obj-y += reset_rk3036.o
 obj-y += syscon_rk3036.o
 endif
 
diff --git a/arch/arm/mach-rockchip/rk3288/Makefile b/arch/arm/mach-rockchip/rk3288/Makefile
index 82b00a1..5ec3f0d 100644
--- a/arch/arm/mach-rockchip/rk3288/Makefile
+++ b/arch/arm/mach-rockchip/rk3288/Makefile
@@ -5,6 +5,5 @@
 #
 
 obj-y += clk_rk3288.o
-obj-y += reset_rk3288.o
 obj-y += sdram_rk3288.o
 obj-y += syscon_rk3288.o
diff --git a/arch/arm/mach-rockchip/rk3399/Makefile b/arch/arm/mach-rockchip/rk3399/Makefile
index 3ca2028..607f9c9 100644
--- a/arch/arm/mach-rockchip/rk3399/Makefile
+++ b/arch/arm/mach-rockchip/rk3399/Makefile
@@ -5,5 +5,4 @@
 #
 
 obj-y += rk3399.o
-obj-y += reset_rk3399.o
 obj-y += syscon_rk3399.o
diff --git a/arch/arm/mach-snapdragon/Makefile b/arch/arm/mach-snapdragon/Makefile
index 4735844..d82a04d 100644
--- a/arch/arm/mach-snapdragon/Makefile
+++ b/arch/arm/mach-snapdragon/Makefile
@@ -6,4 +6,3 @@
 
 obj-y += clock-apq8016.o
 obj-y += sysmap-apq8016.o
-obj-y += reset.o
diff --git a/drivers/Kconfig b/drivers/Kconfig
index f6003a0..4f84469 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -68,6 +68,8 @@ source "drivers/spi/Kconfig"
 
 source "drivers/spmi/Kconfig"
 
+source "drivers/sysreset/Kconfig"
+
 source "drivers/thermal/Kconfig"
 
 source "drivers/timer/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index ad5cbae..7861d34 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -22,7 +22,7 @@ obj-$(CONFIG_SPL_SERIAL_SUPPORT) += serial/
 obj-$(CONFIG_SPL_SPI_SUPPORT) += spi/
 obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/
 obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/
-obj-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += misc/
+obj-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += misc/ sysreset/
 obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/
 obj-$(CONFIG_SPL_NAND_SUPPORT) += mtd/nand/
 obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/
@@ -59,6 +59,7 @@ obj-$(CONFIG_X86) += pch/
 obj-y += rtc/
 obj-y += sound/
 obj-y += spmi/
+obj-y += sysreset/
 obj-y += timer/
 obj-y += tpm/
 obj-y += twserial/
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index b84e351..80c1558 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -121,15 +121,6 @@ config PCA9551_I2C_ADDR
 	help
 	  The I2C address of the PCA9551 LED controller.
 
-config SYSRESET
-	bool "Enable support for system reset drivers"
-	depends on DM
-	help
-	  Enable system reset drivers which can be used to reset the CPU or
-	  board. Each driver can provide a reset method which will be called
-	  to effect a reset. The uclass will try all available drivers when
-	  reset_walk() is called.
-
 config WINBOND_W83627
 	bool "Enable Winbond Super I/O driver"
 	help
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index fff6f0c..af541c6 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -27,7 +27,6 @@ obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
 obj-$(CONFIG_NS87308) += ns87308.o
 obj-$(CONFIG_PDSP188x) += pdsp188x.o
 obj-$(CONFIG_$(SPL_)PWRSEQ) += pwrseq-uclass.o
-obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o
 ifdef CONFIG_DM_I2C
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_SANDBOX) += i2c_eeprom_emul.o
@@ -47,7 +46,6 @@ obj-$(CONFIG_TWL4030_LED) += twl4030_led.o
 obj-$(CONFIG_FSL_IFC) += fsl_ifc.o
 obj-$(CONFIG_FSL_SEC_MON) += fsl_sec_mon.o
 obj-$(CONFIG_PCA9551_LED) += pca9551_led.o
-obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
 obj-$(CONFIG_FSL_DEVICE_DISABLE) += fsl_devdis.o
 obj-$(CONFIG_WINBOND_W83627) += winbond_w83627.o
 obj-$(CONFIG_QFW) += qfw.o
diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
new file mode 100644
index 0000000..05a37b9
--- /dev/null
+++ b/drivers/sysreset/Kconfig
@@ -0,0 +1,16 @@
+#
+# System reset devices
+#
+
+menu "System reset device drivers"
+
+config SYSRESET
+	bool "Enable support for system reset drivers"
+	depends on DM
+	help
+	  Enable system reset drivers which can be used to reset the CPU or
+	  board. Each driver can provide a reset method which will be called
+	  to effect a reset. The uclass will try all available drivers when
+	  reset_walk() is called.
+
+endmenu
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
new file mode 100644
index 0000000..7db1b69
--- /dev/null
+++ b/drivers/sysreset/Makefile
@@ -0,0 +1,15 @@
+#
+# (C) Copyright 2016 Cadence Design Systems Inc.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
+
+ifndef CONFIG_SPL_BUILD
+obj-$(CONFIG_ROCKCHIP_RK3036) += sysreset_rk3036.o
+endif
+obj-$(CONFIG_ROCKCHIP_RK3288) += sysreset_rk3288.o
+obj-$(CONFIG_ROCKCHIP_RK3399) += sysreset_rk3399.o
+obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o
+obj-$(CONFIG_ARCH_SNAPDRAGON) += sysreset_snapdragon.o
diff --git a/drivers/misc/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
similarity index 100%
rename from drivers/misc/sysreset-uclass.c
rename to drivers/sysreset/sysreset-uclass.c
diff --git a/arch/arm/mach-rockchip/rk3036/reset_rk3036.c b/drivers/sysreset/sysreset_rk3036.c
similarity index 100%
rename from arch/arm/mach-rockchip/rk3036/reset_rk3036.c
rename to drivers/sysreset/sysreset_rk3036.c
diff --git a/arch/arm/mach-rockchip/rk3288/reset_rk3288.c b/drivers/sysreset/sysreset_rk3288.c
similarity index 100%
rename from arch/arm/mach-rockchip/rk3288/reset_rk3288.c
rename to drivers/sysreset/sysreset_rk3288.c
diff --git a/arch/arm/mach-rockchip/rk3399/reset_rk3399.c b/drivers/sysreset/sysreset_rk3399.c
similarity index 100%
rename from arch/arm/mach-rockchip/rk3399/reset_rk3399.c
rename to drivers/sysreset/sysreset_rk3399.c
diff --git a/drivers/misc/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
similarity index 100%
rename from drivers/misc/sysreset_sandbox.c
rename to drivers/sysreset/sysreset_sandbox.c
diff --git a/arch/arm/mach-snapdragon/reset.c b/drivers/sysreset/sysreset_snapdragon.c
similarity index 100%
rename from arch/arm/mach-snapdragon/reset.c
rename to drivers/sysreset/sysreset_snapdragon.c
-- 
2.1.4



More information about the U-Boot mailing list