diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-23 13:00:11 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-23 13:05:12 +0100 |
commit | 35f1db94036d22b5892c300e017ebc91f83ae88b (patch) | |
tree | 6c8e36133cc9e43fb3014335477de1b0bf4afd41 /drivers | |
parent | 50af0029486fbc7325f9e51213b780de789e282c (diff) | |
download | barebox-35f1db94036d22b5892c300e017ebc91f83ae88b.tar.gz |
clk: clk-gpio: Add Kconfig symbol
clk-gpio is always compiled in with CONFIG_COMMON_CLK=y. It really
depends on CONFIG_COMMON_CLK_OF_PROVIDER though, without this
of_clk_init() just compiles to a static inline stub and the clk-gpio
driver becomes a no-op.
With the conversion to a driver in the next patch this no longer works
and compilation of the driver results in a undefined reference to
of_clk_get_parent_name. To avoid that create a Kconfig symbol for the
driver which defaults to yes when CONFIG_COMMON_CLK_OF_PROVIDER is set.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/Kconfig | 5 | ||||
-rw-r--r-- | drivers/clk/Makefile | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 0faea6488e..076e77c859 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -38,6 +38,11 @@ config COMMON_CLK_SCMI This driver uses SCMI Message Protocol to interact with the firmware providing all the clock controls. +config COMMON_CLK_GPIO + bool + default y + depends on COMMON_CLK_OF_PROVIDER + source "drivers/clk/sifive/Kconfig" endif diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index baf452de98..c865e4c274 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -2,7 +2,7 @@ obj-$(CONFIG_COMMON_CLK) += clk.o clk-fixed.o clk-divider.o clk-fixed-factor.o \ clk-mux.o clk-gate.o clk-composite.o \ clk-fractional-divider.o clk-conf.o \ - clk-gate-shared.o clk-gpio.o \ + clk-gate-shared.o \ clk-bulk.o obj-$(CONFIG_CLKDEV_LOOKUP) += clkdev.o @@ -28,3 +28,4 @@ obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o obj-$(CONFIG_MACH_RPI_COMMON) += clk-rpi.o obj-y += bcm/ obj-$(CONFIG_COMMON_CLK_SCMI) += clk-scmi.o +obj-$(CONFIG_COMMON_CLK_GPIO) += clk-gpio.o |