diff options
author | Magnus Damm <damm@opensource.se> | 2010-05-21 01:19:34 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-22 04:23:14 -0400 |
commit | 0163acf3c7fd2418f7bc86890e8950ddca510f07 (patch) | |
tree | 45110a4a81f7a2c2d4745650cecb988db19b492b /arch/arm/mach-shmobile/board-g4evm.c | |
parent | 4f0836b4f9b9bf807719f203205f251a7a46ebd9 (diff) |
ARM: mach-shmobile: sh7377 clock framework V2
This patch is V2 of clock framework tables/code for sh7377.
MSTP support is included for the following hardware blocks:
KEYSC, SCIF, IIC, IRDA, FLCTL, USB, SDHI and UIO.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-g4evm.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-g4evm.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c index b75372e0563f..e256b7cc4275 100644 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ b/arch/arm/mach-shmobile/board-g4evm.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
40 | #include <asm/mach/time.h> | ||
40 | 41 | ||
41 | /* | 42 | /* |
42 | * SDHI | 43 | * SDHI |
@@ -259,9 +260,8 @@ static void __init g4evm_map_io(void) | |||
259 | { | 260 | { |
260 | iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); | 261 | iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); |
261 | 262 | ||
262 | /* setup early devices, clocks and console here as well */ | 263 | /* setup early devices and console here as well */ |
263 | sh7377_add_early_devices(); | 264 | sh7377_add_early_devices(); |
264 | sh7367_clock_init(); /* use g3 clocks for now */ | ||
265 | shmobile_setup_console(); | 265 | shmobile_setup_console(); |
266 | } | 266 | } |
267 | 267 | ||
@@ -327,9 +327,6 @@ static void __init g4evm_init(void) | |||
327 | gpio_request(GPIO_FN_EXTLP, NULL); | 327 | gpio_request(GPIO_FN_EXTLP, NULL); |
328 | gpio_request(GPIO_FN_IDIN, NULL); | 328 | gpio_request(GPIO_FN_IDIN, NULL); |
329 | 329 | ||
330 | /* enable clock in SMSTPCR3 */ | ||
331 | __raw_writel(__raw_readl(0xe615013c) & ~(1 << 22), 0xe615013c); | ||
332 | |||
333 | /* setup USB phy */ | 330 | /* setup USB phy */ |
334 | __raw_writew(0x0200, 0xe605810a); /* USBCR1 */ | 331 | __raw_writew(0x0200, 0xe605810a); /* USBCR1 */ |
335 | __raw_writew(0x00e0, 0xe60581c0); /* CPFCH */ | 332 | __raw_writew(0x00e0, 0xe60581c0); /* CPFCH */ |
@@ -384,11 +381,21 @@ static void __init g4evm_init(void) | |||
384 | platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); | 381 | platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); |
385 | } | 382 | } |
386 | 383 | ||
384 | static void __init g4evm_timer_init(void) | ||
385 | { | ||
386 | sh7377_clock_init(); | ||
387 | shmobile_timer.init(); | ||
388 | } | ||
389 | |||
390 | static struct sys_timer g4evm_timer = { | ||
391 | .init = g4evm_timer_init, | ||
392 | }; | ||
393 | |||
387 | MACHINE_START(G4EVM, "g4evm") | 394 | MACHINE_START(G4EVM, "g4evm") |
388 | .phys_io = 0xe6000000, | 395 | .phys_io = 0xe6000000, |
389 | .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc, | 396 | .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc, |
390 | .map_io = g4evm_map_io, | 397 | .map_io = g4evm_map_io, |
391 | .init_irq = sh7377_init_irq, | 398 | .init_irq = sh7377_init_irq, |
392 | .init_machine = g4evm_init, | 399 | .init_machine = g4evm_init, |
393 | .timer = &shmobile_timer, | 400 | .timer = &g4evm_timer, |
394 | MACHINE_END | 401 | MACHINE_END |