spl: dm: Kconfig: split CLK support for SPL and TPL
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Wed, 28 Jun 2017 23:45:01 +0000 (01:45 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 13 Aug 2017 15:12:20 +0000 (17:12 +0200)
Introduce TPL_CLK to allow finer-grained selection of TPL features
for feature-rich (i.e. DM-based) TPL stages.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/clk/Kconfig
drivers/clk/Makefile

index b4a4877575c5e294dc32ecb30bba0fe76246c677..7765148876d9613f6de1546da13d621aed26315a 100644 (file)
@@ -20,6 +20,16 @@ config SPL_CLK
          setting up clocks within SPL, and allows the same drivers to be
          used as U-Boot proper.
 
+config TPL_CLK
+       bool "Enable clock support in TPL"
+       depends on CLK && TPL_DM
+       help
+         The clock subsystem adds a small amount of overhead to the image.
+         If this is acceptable and you have a need to use clock drivers in
+         SPL, enable this option. It might provide a cleaner interface to
+         setting up clocks within TPL, and allows the same drivers to be
+         used as U-Boot proper.
+
 config CLK_BCM6345
        bool "Clock controller driver for BCM6345"
        depends on CLK && ARCH_BMIPS
index 159f285f9a2e76dabb2d63b0c60737f32f7f8048..b7735933be5c952fbfb5b91c4ede202663f853da 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:      GPL-2.0+
 #
 
-obj-$(CONFIG_CLK) += clk-uclass.o clk_fixed_rate.o
+obj-$(CONFIG_$(SPL_TPL_)CLK) += clk-uclass.o clk_fixed_rate.o
 obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
 obj-$(CONFIG_SANDBOX) += clk_sandbox.o
 obj-$(CONFIG_SANDBOX) += clk_sandbox_test.o