aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-05-11 05:37:05 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-13 04:38:07 -0400
commit67bbabbc8680f53c7b8780d991f655c5cbb88700 (patch)
treedebb8a9e4c579cb58114482bf33ee8fd5169bdd6 /arch
parent9c352bcab7f28e472b06c91d57210b93e08f0fbb (diff)
sh: switch boards to clkdev
This patch converts the remaining board clocks to use clkdev for lookup if needed. The 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')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c2
-rw-r--r--arch/sh/boards/mach-highlander/setup.c12
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c2
3 files changed, 11 insertions, 5 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 6c13b92742e..1850c087a93 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -710,8 +710,6 @@ static struct clk_ops fsimck_clk_ops = {
710}; 710};
711 711
712static struct clk fsimckb_clk = { 712static struct clk fsimckb_clk = {
713 .name = "fsimckb_clk",
714 .id = -1,
715 .ops = &fsimck_clk_ops, 713 .ops = &fsimck_clk_ops,
716 .enable_reg = (void __iomem *)FCLKBCR, 714 .enable_reg = (void __iomem *)FCLKBCR,
717 .rate = 0, /* unknown */ 715 .rate = 0, /* unknown */
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index affd66747ba..a5ecfbacaf3 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -14,6 +14,7 @@
14 * for more details. 14 * for more details.
15 */ 15 */
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/io.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
18#include <linux/ata_platform.h> 19#include <linux/ata_platform.h>
19#include <linux/types.h> 20#include <linux/types.h>
@@ -26,6 +27,7 @@
26#include <net/ax88796.h> 27#include <net/ax88796.h>
27#include <asm/machvec.h> 28#include <asm/machvec.h>
28#include <mach/highlander.h> 29#include <mach/highlander.h>
30#include <asm/clkdev.h>
29#include <asm/clock.h> 31#include <asm/clock.h>
30#include <asm/heartbeat.h> 32#include <asm/heartbeat.h>
31#include <asm/io.h> 33#include <asm/io.h>
@@ -326,7 +328,6 @@ static struct clk_ops ivdr_clk_ops = {
326}; 328};
327 329
328static struct clk ivdr_clk = { 330static struct clk ivdr_clk = {
329 .name = "ivdr_clk",
330 .ops = &ivdr_clk_ops, 331 .ops = &ivdr_clk_ops,
331}; 332};
332 333
@@ -334,6 +335,13 @@ static struct clk *r7780rp_clocks[] = {
334 &ivdr_clk, 335 &ivdr_clk,
335}; 336};
336 337
338#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
339
340static struct clk_lookup lookups[] = {
341 /* main clocks */
342 CLKDEV_CON_ID("ivdr_clk", &ivdr_clk),
343};
344
337static void r7780rp_power_off(void) 345static void r7780rp_power_off(void)
338{ 346{
339 if (mach_is_r7780mp() || mach_is_r7785rp()) 347 if (mach_is_r7780mp() || mach_is_r7785rp())
@@ -370,6 +378,8 @@ static void __init highlander_setup(char **cmdline_p)
370 clk_enable(clk); 378 clk_enable(clk);
371 } 379 }
372 380
381 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
382
373 __raw_writew(0x0000, PA_OBLED); /* Clear LED. */ 383 __raw_writew(0x0000, PA_OBLED); /* Clear LED. */
374 384
375 if (mach_is_r7780rp()) 385 if (mach_is_r7780rp())
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index ccaa290e9ab..20b6053f714 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -276,8 +276,6 @@ static struct clk_ops fsimck_clk_ops = {
276}; 276};
277 277
278static struct clk fsimcka_clk = { 278static struct clk fsimcka_clk = {
279 .name = "fsimcka_clk",
280 .id = -1,
281 .ops = &fsimck_clk_ops, 279 .ops = &fsimck_clk_ops,
282 .enable_reg = (void __iomem *)FCLKACR, 280 .enable_reg = (void __iomem *)FCLKACR,
283 .rate = 0, /* unknown */ 281 .rate = 0, /* unknown */