openrisc: init: Add support for common clk
authorStafford Horne <shorne@gmail.com>
Tue, 11 Jan 2022 02:55:37 +0000 (11:55 +0900)
committerStafford Horne <shorne@gmail.com>
Tue, 11 Jan 2022 21:13:22 +0000 (06:13 +0900)
When testing the new litex_mmc driver it was found to not work on
OpenRISC due to missing support for common clk.  This patch does the
basic initialization to allow OpenRISC to use the common clk framework.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/openrisc/Kconfig
arch/openrisc/kernel/time.c

index c2491b295d6087c45f79ed8809d3b6c0b64f37ca..f724b3f1aeed7b4942f95b438e1a620f1ae38240 100644 (file)
@@ -10,6 +10,7 @@ config OPENRISC
        select ARCH_HAS_DMA_SET_UNCACHED
        select ARCH_HAS_DMA_CLEAR_UNCACHED
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
+       select COMMON_CLK
        select OF
        select OF_EARLY_FLATTREE
        select IRQ_DOMAIN
index a6e69386f82a1ded9b6c6e87769565c1f43425fc..6d18989d63d099e3f24d7dde14233f22adbb12a3 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/clockchips.h>
 #include <linux/irq.h>
 #include <linux/io.h>
+#include <linux/of_clk.h>
 
 #include <asm/cpuinfo.h>
 
@@ -169,4 +170,7 @@ void __init time_init(void)
 
        openrisc_timer_init();
        openrisc_clockevent_init();
+
+       of_clk_init(NULL);
+       timer_probe();
 }