diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-26 10:50:40 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-26 10:50:40 -0400 |
commit | 464c9e10376b24f04402fa8ef72b66257561bffa (patch) | |
tree | ac95ad416a2d3f3afcc92ca1790267a03b2be10d /arch/sh/boards | |
parent | b7e2ac619465f1774b827d9997109ceef4a61851 (diff) | |
parent | 61ce5393e4c8914c46ec99cbda76823515109709 (diff) |
Merge branch 'sh/clkfwk'
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 6f94f17adc46..33b194b0454d 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -2,12 +2,12 @@ | |||
2 | * Renesas Technology Corp. R0P7785LC0011RL Support. | 2 | * Renesas Technology Corp. R0P7785LC0011RL Support. |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Yoshihiro Shimoda | 4 | * Copyright (C) 2008 Yoshihiro Shimoda |
5 | * Copyright (C) 2009 Paul Mundt | ||
5 | * | 6 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
7 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
8 | * for more details. | 9 | * for more details. |
9 | */ | 10 | */ |
10 | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/sm501.h> | 13 | #include <linux/sm501.h> |
@@ -19,8 +19,11 @@ | |||
19 | #include <linux/i2c-pca-platform.h> | 19 | #include <linux/i2c-pca-platform.h> |
20 | #include <linux/i2c-algo-pca.h> | 20 | #include <linux/i2c-algo-pca.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <asm/heartbeat.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/errno.h> | ||
23 | #include <mach/sh7785lcr.h> | 24 | #include <mach/sh7785lcr.h> |
25 | #include <asm/heartbeat.h> | ||
26 | #include <asm/clock.h> | ||
24 | 27 | ||
25 | /* | 28 | /* |
26 | * NOTE: This board has 2 physical memory maps. | 29 | * NOTE: This board has 2 physical memory maps. |
@@ -273,6 +276,20 @@ void __init init_sh7785lcr_IRQ(void) | |||
273 | plat_irq_setup_pins(IRQ_MODE_IRQ3210); | 276 | plat_irq_setup_pins(IRQ_MODE_IRQ3210); |
274 | } | 277 | } |
275 | 278 | ||
279 | static int sh7785lcr_clk_init(void) | ||
280 | { | ||
281 | struct clk *clk; | ||
282 | int ret; | ||
283 | |||
284 | clk = clk_get(NULL, "extal"); | ||
285 | if (!clk || IS_ERR(clk)) | ||
286 | return PTR_ERR(clk); | ||
287 | ret = clk_set_rate(clk, 33333333); | ||
288 | clk_put(clk); | ||
289 | |||
290 | return ret; | ||
291 | } | ||
292 | |||
276 | static void sh7785lcr_power_off(void) | 293 | static void sh7785lcr_power_off(void) |
277 | { | 294 | { |
278 | unsigned char *p; | 295 | unsigned char *p; |
@@ -309,6 +326,7 @@ static void __init sh7785lcr_setup(char **cmdline_p) | |||
309 | static struct sh_machine_vector mv_sh7785lcr __initmv = { | 326 | static struct sh_machine_vector mv_sh7785lcr __initmv = { |
310 | .mv_name = "SH7785LCR", | 327 | .mv_name = "SH7785LCR", |
311 | .mv_setup = sh7785lcr_setup, | 328 | .mv_setup = sh7785lcr_setup, |
329 | .mv_clk_init = sh7785lcr_clk_init, | ||
312 | .mv_init_irq = init_sh7785lcr_IRQ, | 330 | .mv_init_irq = init_sh7785lcr_IRQ, |
313 | }; | 331 | }; |
314 | 332 | ||