Skip to content

Commit 7f435e4

Browse files
committed
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. Signed-off-by: Stafford Horne <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]>
1 parent 433fe39 commit 7f435e4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

arch/openrisc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ config OPENRISC
1010
select ARCH_HAS_DMA_SET_UNCACHED
1111
select ARCH_HAS_DMA_CLEAR_UNCACHED
1212
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
13+
select COMMON_CLK
1314
select OF
1415
select OF_EARLY_FLATTREE
1516
select IRQ_DOMAIN

arch/openrisc/kernel/time.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/clockchips.h>
2121
#include <linux/irq.h>
2222
#include <linux/io.h>
23+
#include <linux/of_clk.h>
2324

2425
#include <asm/cpuinfo.h>
2526

@@ -169,4 +170,7 @@ void __init time_init(void)
169170

170171
openrisc_timer_init();
171172
openrisc_clockevent_init();
173+
174+
of_clk_init(NULL);
175+
timer_probe();
172176
}

0 commit comments

Comments
 (0)