Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: axi-clkgen: replace ARCH dependencies with driver deps

The intent is to be able to run this driver to access the IP core in setups
where FPGA board is also connected via a PCIe bus. In such cases the number
of combinations explodes, where the host system can be an x86 with Xilinx
Zynq/ZynqMP/Microblaze board connected via PCIe.
Or even a ZynqMP board with a ZynqMP/Zynq/Microblaze connected via PCIe.

To accommodate for these cases, this change removes the limitation for this
driver to be compilable only on Zynq/Microblaze architectures.
And adds dependencies on the mechanisms required by the driver to work (OF
and HAS_IOMEM).

Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210201151245.21845-2-alexandru.ardelean@analog.com
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Alexandru Ardelean and committed by
Stephen Boyd
324a8105 5c8fe583

+2 -1
+2 -1
drivers/clk/Kconfig
··· 247 247 248 248 config COMMON_CLK_AXI_CLKGEN 249 249 tristate "AXI clkgen driver" 250 - depends on ARCH_ZYNQ || MICROBLAZE || COMPILE_TEST 250 + depends on HAS_IOMEM || COMPILE_TEST 251 + depends on OF 251 252 help 252 253 Support for the Analog Devices axi-clkgen pcore clock generator for Xilinx 253 254 FPGAs. It is commonly used in Analog Devices' reference designs.