diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4/clock-sh4-202.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4/clock-sh4-202.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c index 6b80850294d..4eabc68cd75 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c | |||
@@ -12,9 +12,10 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/io.h> | ||
16 | #include <asm/clkdev.h> | ||
15 | #include <asm/clock.h> | 17 | #include <asm/clock.h> |
16 | #include <asm/freq.h> | 18 | #include <asm/freq.h> |
17 | #include <asm/io.h> | ||
18 | 19 | ||
19 | #define CPG2_FRQCR3 0xfe0a0018 | 20 | #define CPG2_FRQCR3 0xfe0a0018 |
20 | 21 | ||
@@ -45,7 +46,6 @@ static struct clk_ops sh4202_emi_clk_ops = { | |||
45 | }; | 46 | }; |
46 | 47 | ||
47 | static struct clk sh4202_emi_clk = { | 48 | static struct clk sh4202_emi_clk = { |
48 | .name = "emi_clk", | ||
49 | .flags = CLK_ENABLE_ON_INIT, | 49 | .flags = CLK_ENABLE_ON_INIT, |
50 | .ops = &sh4202_emi_clk_ops, | 50 | .ops = &sh4202_emi_clk_ops, |
51 | }; | 51 | }; |
@@ -61,7 +61,6 @@ static struct clk_ops sh4202_femi_clk_ops = { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | static struct clk sh4202_femi_clk = { | 63 | static struct clk sh4202_femi_clk = { |
64 | .name = "femi_clk", | ||
65 | .flags = CLK_ENABLE_ON_INIT, | 64 | .flags = CLK_ENABLE_ON_INIT, |
66 | .ops = &sh4202_femi_clk_ops, | 65 | .ops = &sh4202_femi_clk_ops, |
67 | }; | 66 | }; |
@@ -139,7 +138,6 @@ static struct clk_ops sh4202_shoc_clk_ops = { | |||
139 | }; | 138 | }; |
140 | 139 | ||
141 | static struct clk sh4202_shoc_clk = { | 140 | static struct clk sh4202_shoc_clk = { |
142 | .name = "shoc_clk", | ||
143 | .flags = CLK_ENABLE_ON_INIT, | 141 | .flags = CLK_ENABLE_ON_INIT, |
144 | .ops = &sh4202_shoc_clk_ops, | 142 | .ops = &sh4202_shoc_clk_ops, |
145 | }; | 143 | }; |
@@ -150,6 +148,15 @@ static struct clk *sh4202_onchip_clocks[] = { | |||
150 | &sh4202_shoc_clk, | 148 | &sh4202_shoc_clk, |
151 | }; | 149 | }; |
152 | 150 | ||
151 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } | ||
152 | |||
153 | static struct clk_lookup lookups[] = { | ||
154 | /* main clocks */ | ||
155 | CLKDEV_CON_ID("emi_clk", &sh4202_emi_clk), | ||
156 | CLKDEV_CON_ID("femi_clk", &sh4202_femi_clk), | ||
157 | CLKDEV_CON_ID("shoc_clk", &sh4202_shoc_clk), | ||
158 | }; | ||
159 | |||
153 | int __init arch_clk_init(void) | 160 | int __init arch_clk_init(void) |
154 | { | 161 | { |
155 | struct clk *clk; | 162 | struct clk *clk; |
@@ -167,5 +174,7 @@ int __init arch_clk_init(void) | |||
167 | 174 | ||
168 | clk_put(clk); | 175 | clk_put(clk); |
169 | 176 | ||
177 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
178 | |||
170 | return ret; | 179 | return ret; |
171 | } | 180 | } |