All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lin Huang <hl@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 05/17] dm: core: Add SPL Kconfig for REGMAP and SYSCON
Date: Fri,  6 Nov 2015 17:33:19 +0800	[thread overview]
Message-ID: <1446802414-31132-6-git-send-email-hl@rock-chips.com> (raw)
In-Reply-To: <1446802414-31132-1-git-send-email-hl@rock-chips.com>

Add SPL Kconfig for REGMAP and SYSCON, so REGMAP and SYSCON can
remove from SPL stage.

Signed-off-by: Lin Huang <hl@rock-chips.com>
---
Changes in v1: None
Changes in v2: None
Changes in v3:
- fix compile error

 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 3ded392..eca8409 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -12,11 +12,13 @@ CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_SPL_SYSCON=y
 CONFIG_LED=y
 CONFIG_SPL_LED=y
 CONFIG_LED_GPIO=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index edb2db2..ec7ab8e 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -12,11 +12,13 @@ CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_SPL_SYSCON=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_RESET=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 67ae99b..afee421 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -17,7 +17,9 @@ CONFIG_CMD_TPM_TEST=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
 CONFIG_DEVRES=y
 CONFIG_CLK=y
 CONFIG_SANDBOX_GPIO=y
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 15681df..ac68172 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

  parent reply	other threads:[~2015-11-06  9:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06  9:33 [U-Boot] [PATCH v3 00/20] Bring up rk3036 uboot Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 01/17] rockchip: add timer driver Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 02/17] rockchip: move SYS_MALLOC_F_LEN to rk3288 own Kconfig Lin Huang
2015-11-06 12:08   ` Simon Glass
2015-11-09  2:59     ` hl
2015-11-09  4:46       ` Simon Glass
2015-11-09  4:51         ` hl
2015-11-06  9:33 ` [U-Boot] [PATCH v3 03/17] rockchip: rename board-spl.c to rk3288-board-spl.c Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 04/17] rockchip: add config decide whether to build common.c Lin Huang
2015-11-06  9:33 ` Lin Huang [this message]
2015-11-06  9:33 ` [U-Boot] [PATCH v3 06/17] rockchip: serial driver support rk3036 Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 07/17] rockchip: Bring in RK3036 device tree file includes and bindings Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 08/17] rockchip: rk3036: Add clock driver Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 09/17] rockchip: rk3036: Add header files for GRF Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 10/17] rockchip: rk3036: Add Soc reset driver Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 11/17] rockchip: rk3036: Add a simple syscon driver Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 12/17] rockchip: rk3036: Add pinctrl driver Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 13/17] rockchip: Add an rk3036 MMC driver Lin Huang
2015-11-06  9:33 ` [U-Boot] [PATCH v3 14/17] rockchip: add early uart driver Lin Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446802414-31132-6-git-send-email-hl@rock-chips.com \
    --to=hl@rock-chips.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.