clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM

[ Upstream commit e7dd44f4f3 ]

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM so that it won't
be built to cause below compiling error if PCI is unset:

------
ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
clk-fixed-mmio.c:(.text+0x5e): undefined reference to `of_iomap'
ld: clk-fixed-mmio.c:(.text+0xba): undefined reference to `iounmap'
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Link: https://lore.kernel.org/r/20230707135852.24292-8-bhe@redhat.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Baoquan He 2023-07-07 21:58:51 +08:00 committed by Greg Kroah-Hartman
parent 473a55cfc1
commit 98f933716a
1 changed files with 1 additions and 0 deletions

View File

@ -427,6 +427,7 @@ config COMMON_CLK_BD718XX
config COMMON_CLK_FIXED_MMIO config COMMON_CLK_FIXED_MMIO
bool "Clock driver for Memory Mapped Fixed values" bool "Clock driver for Memory Mapped Fixed values"
depends on COMMON_CLK && OF depends on COMMON_CLK && OF
depends on HAS_IOMEM
help help
Support for Memory Mapped IO Fixed clocks Support for Memory Mapped IO Fixed clocks