openrisc: init: Add support for common clk
Stafford Horne
maintainerPATCH 1/1 openrisc: init: Add support for common clk
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.
--- arch/openrisc/Kconfig | 1 + arch/openrisc/kernel/time.c | 4 ++++ 2 files changed, 5 insertions(+)
arch/openrisc/Kconfig +1 -0
@@ -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
arch/openrisc/kernel/time.c +4 -0
@@ -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 (); }
Signature · 1 line
2.31.1
Hi Stafford,
Quoted 5 lines · Stafford Horne
When testing the new
litex_mmcdriver 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 <[email protected]>
Thanks for your patch!
This matches what other architectures are doing, and is IMHO the way forward for sharing FPGA drivers among architectures.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Stafford Horne
maintainerQuoted 7 lines · Geert Uytterhoeven
Hi Stafford,
Quoted 4 lines · Stafford Horne
When testing the new
litex_mmcdriver 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.
Quoted 7 lines
Quoted 1 line
Signed-off-by Stafford Horne <[email protected]>Thanks for your patch!
This matches what other architectures are doing, and is IMHO the way forward for sharing FPGA drivers among architectures.
Reviewed-by Geert Uytterhoeven <[email protected]>
Thank you.
-Stafford