Commit f26e4331 authored by Dragos Bogdan's avatar Dragos Bogdan Committed by Ley Foon Tan

arch: nios2: Enable the common clk subsystem on Nios2

This patch adds support for common clock framework on Nios2. Clock
framework is commonly used in many drivers, and this patch makes it
available for the entire architecture, not just on a per-driver basis.
Signed-off-by: default avatarBeniamin Bia <beniamin.bia@analog.com>
Signed-off-by: default avatarDragos Bogdan <dragos.bogdan@analog.com>
Signed-off-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
parent 7111951b
...@@ -6,6 +6,7 @@ config NIOS2 ...@@ -6,6 +6,7 @@ config NIOS2
select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select ARCH_HAS_UNCACHED_SEGMENT select ARCH_HAS_UNCACHED_SEGMENT
select ARCH_NO_SWAP select ARCH_NO_SWAP
select COMMON_CLK
select TIMER_OF select TIMER_OF
select GENERIC_ATOMIC64 select GENERIC_ATOMIC64
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
......
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/sys_soc.h> #include <linux/sys_soc.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/clk-provider.h>
static const struct of_device_id clk_match[] __initconst = {
{ .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
{}
};
static int __init nios2_soc_device_init(void) static int __init nios2_soc_device_init(void)
{ {
...@@ -38,6 +44,8 @@ static int __init nios2_soc_device_init(void) ...@@ -38,6 +44,8 @@ static int __init nios2_soc_device_init(void)
} }
} }
of_clk_init(clk_match);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment