[U-Boot] [PATCH v2 05/17] dm: core: Add SPL Kconfig for REGMAP and SYSCON

Lin Huang hl at rock-chips.com
Wed Nov 4 13:53:28 CET 2015


Add SPL Kconfig for REGMAP and SYSCON, so REGMAP and SYSCON can
remove from SPL stage.
---
 configs/chromebook_jerry_defconfig |  2 ++
 configs/firefly-rk3288_defconfig   |  2 ++
 configs/sandbox_defconfig          |  2 ++
 drivers/core/Kconfig               | 19 +++++++++++++++++++
 drivers/core/Makefile              |  4 ++--
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index 389dfd2..05ab984 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -14,7 +14,9 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
 CONFIG_RESET=y
 CONFIG_LED=y
 CONFIG_SPL_LED=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 5fe90b5..b202d6e 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -14,7 +14,9 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
 CONFIG_RESET=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index e9e1597..008ec90 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -17,7 +17,9 @@ CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_CLK=y
 CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
 CONFIG_DEVRES=y
 CONFIG_DM_PCI=y
 CONFIG_PCI_SANDBOX=y
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 41f4e69..ee65884 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -72,6 +72,16 @@ config REGMAP
 	  support any bus type (I2C, SPI) but so far this only supports
 	  direct memory access.
 
+config SPL_REGMAP
+	bool "Support register maps in SPL"
+	depends on DM
+	help
+	  Hardware peripherals tend to have one or more sets of registers
+	  which can be accessed to control the hardware. A register map
+	  models this with a simple read/write interface. It can in principle
+	  support any bus type (I2C, SPI) but so far this only supports
+	  direct memory access.
+
 config SYSCON
 	bool "Support system controllers"
 	depends on REGMAP
@@ -81,6 +91,15 @@ config SYSCON
 	  by this uclass, including accessing registers via regmap and
 	  assigning a unique number to each.
 
+config SPL_SYSCON
+	bool "Support system controllers in SPL"
+	depends on REGMAP
+	help
+	  Many SoCs have a number of system controllers which are dealt with
+	  as a group by a single driver. Some common functionality is provided
+	  by this uclass, including accessing registers via regmap and
+	  assigning a unique number to each.
+
 config DEVRES
 	bool "Managed device resources"
 	depends on DM
diff --git a/drivers/core/Makefile b/drivers/core/Makefile
index f19f67d..07adb61 100644
--- a/drivers/core/Makefile
+++ b/drivers/core/Makefile
@@ -9,5 +9,5 @@ obj-$(CONFIG_DEVRES) += devres.o
 obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE)	+= device-remove.o
 obj-$(CONFIG_$(SPL_)SIMPLE_BUS)	+= simple-bus.o
 obj-$(CONFIG_DM)	+= dump.o
-obj-$(CONFIG_REGMAP)	+= regmap.o
-obj-$(CONFIG_SYSCON)	+= syscon-uclass.o
+obj-$(CONFIG_$(SPL_)REGMAP)	+= regmap.o
+obj-$(CONFIG_$(SPL_)SYSCON)	+= syscon-uclass.o
-- 
1.9.1



More information about the U-Boot mailing list