diff options
Diffstat (limited to 'arch/mips/lantiq/clk.c')
-rw-r--r-- | arch/mips/lantiq/clk.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c index ce2f129b081f..3fc2e6d70c77 100644 --- a/arch/mips/lantiq/clk.c +++ b/arch/mips/lantiq/clk.c | |||
@@ -26,13 +26,15 @@ | |||
26 | #include "prom.h" | 26 | #include "prom.h" |
27 | 27 | ||
28 | /* lantiq socs have 3 static clocks */ | 28 | /* lantiq socs have 3 static clocks */ |
29 | static struct clk cpu_clk_generic[3]; | 29 | static struct clk cpu_clk_generic[4]; |
30 | 30 | ||
31 | void clkdev_add_static(unsigned long cpu, unsigned long fpi, unsigned long io) | 31 | void clkdev_add_static(unsigned long cpu, unsigned long fpi, |
32 | unsigned long io, unsigned long ppe) | ||
32 | { | 33 | { |
33 | cpu_clk_generic[0].rate = cpu; | 34 | cpu_clk_generic[0].rate = cpu; |
34 | cpu_clk_generic[1].rate = fpi; | 35 | cpu_clk_generic[1].rate = fpi; |
35 | cpu_clk_generic[2].rate = io; | 36 | cpu_clk_generic[2].rate = io; |
37 | cpu_clk_generic[3].rate = ppe; | ||
36 | } | 38 | } |
37 | 39 | ||
38 | struct clk *clk_get_cpu(void) | 40 | struct clk *clk_get_cpu(void) |
@@ -51,6 +53,12 @@ struct clk *clk_get_io(void) | |||
51 | return &cpu_clk_generic[2]; | 53 | return &cpu_clk_generic[2]; |
52 | } | 54 | } |
53 | 55 | ||
56 | struct clk *clk_get_ppe(void) | ||
57 | { | ||
58 | return &cpu_clk_generic[3]; | ||
59 | } | ||
60 | EXPORT_SYMBOL_GPL(clk_get_ppe); | ||
61 | |||
54 | static inline int clk_good(struct clk *clk) | 62 | static inline int clk_good(struct clk *clk) |
55 | { | 63 | { |
56 | return clk && !IS_ERR(clk); | 64 | return clk && !IS_ERR(clk); |
@@ -145,9 +153,9 @@ static inline u32 get_counter_resolution(void) | |||
145 | u32 res; | 153 | u32 res; |
146 | 154 | ||
147 | __asm__ __volatile__( | 155 | __asm__ __volatile__( |
148 | ".set push\n" | 156 | ".set push\n" |
149 | ".set mips32r2\n" | 157 | ".set mips32r2\n" |
150 | "rdhwr %0, $3\n" | 158 | "rdhwr %0, $3\n" |
151 | ".set pop\n" | 159 | ".set pop\n" |
152 | : "=&r" (res) | 160 | : "=&r" (res) |
153 | : /* no input */ | 161 | : /* no input */ |