diff options
author | Magnus Damm <damm@opensource.se> | 2010-05-11 05:36:40 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-13 04:37:44 -0400 |
commit | f0e7f90223108e32f6b28393e4ab892209922e0b (patch) | |
tree | 58d81f5d3537c26d2e7c3711feb6390acb8261ba /arch/sh | |
parent | d6a94217fb4b4d193d6064c524df22f97bd49136 (diff) |
sh: switch sh7757 to clkdev
This patch converts the remaining sh7757 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7757.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c index 86aae60677dc..0a752bd324ac 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/clkdev.h> | ||
15 | #include <asm/clock.h> | 16 | #include <asm/clock.h> |
16 | #include <asm/freq.h> | 17 | #include <asm/freq.h> |
17 | 18 | ||
@@ -87,7 +88,6 @@ static struct clk_ops sh7757_shyway_clk_ops = { | |||
87 | }; | 88 | }; |
88 | 89 | ||
89 | static struct clk sh7757_shyway_clk = { | 90 | static struct clk sh7757_shyway_clk = { |
90 | .name = "shyway_clk", | ||
91 | .flags = CLK_ENABLE_ON_INIT, | 91 | .flags = CLK_ENABLE_ON_INIT, |
92 | .ops = &sh7757_shyway_clk_ops, | 92 | .ops = &sh7757_shyway_clk_ops, |
93 | }; | 93 | }; |
@@ -100,6 +100,13 @@ static struct clk *sh7757_onchip_clocks[] = { | |||
100 | &sh7757_shyway_clk, | 100 | &sh7757_shyway_clk, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } | ||
104 | |||
105 | static struct clk_lookup lookups[] = { | ||
106 | /* main clocks */ | ||
107 | CLKDEV_CON_ID("shyway_clk", &sh7757_shyway_clk), | ||
108 | }; | ||
109 | |||
103 | static int __init sh7757_clk_init(void) | 110 | static int __init sh7757_clk_init(void) |
104 | { | 111 | { |
105 | struct clk *clk = clk_get(NULL, "master_clk"); | 112 | struct clk *clk = clk_get(NULL, "master_clk"); |
@@ -123,6 +130,8 @@ static int __init sh7757_clk_init(void) | |||
123 | 130 | ||
124 | clk_put(clk); | 131 | clk_put(clk); |
125 | 132 | ||
133 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
134 | |||
126 | return 0; | 135 | return 0; |
127 | } | 136 | } |
128 | 137 | ||