Commit 026d70dc authored by Brian Masney's avatar Brian Masney Committed by Thomas Bogendoerfer
Browse files

clk: microchip: core: allow driver to be compiled with COMPILE_TEST



This driver currently only supports builds against a PIC32 target. To
avoid future breakage in the future, let's update the Kconfig and the
driver so that it can be built with CONFIG_COMPILE_TEST enabled.

Note that with the existing asm calls is not how I'd want to do this
today if this was a new driver, however I don't have access to this
hardware. To avoid any breakage, let's keep the existing behavior.

Signed-off-by: default avatarBrian Masney <bmasney@redhat.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 89ace073
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

config COMMON_CLK_PIC32
	def_bool COMMON_CLK && MACH_PIC32
	def_bool (COMMON_CLK && MACH_PIC32) || COMPILE_TEST

config MCHP_CLK_MPFS
	bool "Clk driver for PolarFire SoC"
+4 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@
/* SoC specific clock needed during SPLL clock rate switch */
static struct clk_hw *pic32_sclk_hw;

#ifdef CONFIG_MATCH_PIC32
/* add instruction pipeline delay while CPU clock is in-transition. */
#define cpu_nop5()			\
do {					\
@@ -84,6 +85,9 @@ do { \
	__asm__ __volatile__("nop");	\
	__asm__ __volatile__("nop");	\
} while (0)
#else
#define cpu_nop5()
#endif

/* Perpheral bus clocks */
struct pic32_periph_clk {