clocksource/drivers/ixp4xx: Select TIMER_OF when needed
authorArnd Bergmann <arnd@arndb.de>
Sun, 3 Jan 2021 13:59:24 +0000 (14:59 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 18 Jan 2021 15:20:15 +0000 (16:20 +0100)
Compile-testing the ixp4xx timer with CONFIG_OF enabled but
CONFIG_TIMER_OF disabled leads to a harmless warning:

arm-linux-gnueabi-ld: warning: orphan section `__timer_of_table' from `drivers/clocksource/timer-ixp4xx.o' being placed in section `__timer_of_table'

Move the select statement from the platform code into the driver
so it always gets enabled in configurations that rely on it.

Fixes: 40df14cc5cc0 ("clocksource/drivers/ixp4xx: Add OF initialization support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210103135955.3808976-1-arnd@kernel.org
arch/arm/mach-ixp4xx/Kconfig
drivers/clocksource/Kconfig

index f7211b57b1e7885a7ce5f15f6080c99e856aabb4..165c184801e19f4699035a46dd5c1d713cd262ce 100644 (file)
@@ -13,7 +13,6 @@ config MACH_IXP4XX_OF
        select I2C
        select I2C_IOP3XX
        select PCI
-       select TIMER_OF
        select USE_OF
        help
          Say 'Y' here to support Device Tree-based IXP4xx platforms.
index 14c7c4712478769e4ffcaaba4c80c5630ad14ed5..66be9ea69e3329e51bd82f282d4ee32985cde7ca 100644 (file)
@@ -79,6 +79,7 @@ config IXP4XX_TIMER
        bool "Intel XScale IXP4xx timer driver" if COMPILE_TEST
        depends on HAS_IOMEM
        select CLKSRC_MMIO
+       select TIMER_OF if OF
        help
          Enables support for the Intel XScale IXP4xx SoC timer.