diff mbox series

[U-Boot,V2,2/4] power: Add CONFIG_SPL_POWER_DOMAIN config

Message ID 20180727022039.11147-2-peng.fan@nxp.com
State Accepted
Commit e13278c943913af1d11be8955418012bbbad913e
Delegated to: Anatolij Gustschin
Headers show
Series [U-Boot,V2,1/4] power-domain: add dummy functions when CONFIG_POWER_DOMAIN not defined | expand

Commit Message

Peng Fan July 27, 2018, 2:20 a.m. UTC
Add CONFIG_SPL_POWER_DOMAIN config entry.
Build drivers/power/domain if this config is selected.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
---

V2: New

 common/spl/Kconfig            | 9 +++++++++
 drivers/Makefile              | 1 +
 drivers/power/domain/Makefile | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

Comments

Simon Glass July 30, 2018, 1:26 p.m. UTC | #1
On 26 July 2018 at 20:20, Peng Fan <peng.fan@nxp.com> wrote:
> Add CONFIG_SPL_POWER_DOMAIN config entry.
> Build drivers/power/domain if this config is selected.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> ---
>
> V2: New
>
>  common/spl/Kconfig            | 9 +++++++++
>  drivers/Makefile              | 1 +
>  drivers/power/domain/Makefile | 2 +-
>  3 files changed, 11 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Anatolij Gustschin Aug. 6, 2018, 9:10 a.m. UTC | #2
On Fri, 27 Jul 2018 10:20:37 +0800
Peng Fan peng.fan@nxp.com wrote:

> Add CONFIG_SPL_POWER_DOMAIN config entry.
> Build drivers/power/domain if this config is selected.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> 
> V2: New
> 
>  common/spl/Kconfig            | 9 +++++++++
>  drivers/Makefile              | 1 +
>  drivers/power/domain/Makefile | 2 +-
>  3 files changed, 11 insertions(+), 1 deletion(-)

Applied to u-boot-staging/agust@denx.de, thanks!

--
Anatolij
diff mbox series

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 99c9053ab8..2bb1aeb630 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -599,6 +599,15 @@  config SPL_POWER_SUPPORT
 	  in drivers/power, drivers/power/pmic and drivers/power/regulator
 	  as part of an SPL build.
 
+config SPL_POWER_DOMAIN
+	bool "Support power domain drivers"
+	help
+	  Enable support for power domain control in SPL. Many SoCs allow
+	  power to be applied to or removed from portions of the SoC (power
+	  domains). This may be used to save power. This API provides the
+	  means to control such power management hardware. This enables
+	  the drivers in drivers/power/domain as part of a SPL build.
+
 config SPL_RAM_SUPPORT
 	bool "Support booting from RAM"
 	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
diff --git a/drivers/Makefile b/drivers/Makefile
index 276e5ee4d7..d53208540e 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -28,6 +28,7 @@  obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/
 obj-$(CONFIG_ALTERA_SDRAM) += ddr/altera/
 obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/
 obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/
+obj-$(CONFIG_SPL_POWER_DOMAIN) += power/domain/
 obj-$(CONFIG_SPL_DM_RESET) += reset/
 obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/
 obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/
diff --git a/drivers/power/domain/Makefile b/drivers/power/domain/Makefile
index c7d7644402..020eee2378 100644
--- a/drivers/power/domain/Makefile
+++ b/drivers/power/domain/Makefile
@@ -2,7 +2,7 @@ 
 #
 # SPDX-License-Identifier: GPL-2.0
 
-obj-$(CONFIG_POWER_DOMAIN) += power-domain-uclass.o
+obj-$(CONFIG_$(SPL_)POWER_DOMAIN) += power-domain-uclass.o
 obj-$(CONFIG_BCM6328_POWER_DOMAIN) += bcm6328-power-domain.o
 obj-$(CONFIG_SANDBOX_POWER_DOMAIN) += sandbox-power-domain.o
 obj-$(CONFIG_SANDBOX_POWER_DOMAIN) += sandbox-power-domain-test.o