diff options
author | Magnus Damm <damm@opensource.se> | 2012-02-29 07:37:12 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-12 17:19:41 -0400 |
commit | bfc46f3ef838ab3c01f5e240ec43afaf59f7061b (patch) | |
tree | 2d6cfca627035f9ec87829ee3706a2f41f89027f /arch | |
parent | 237caf9e6b0c26168acfa7eed0b0afe463918d4f (diff) |
ARM: mach-shmobile: sh7377 map_io and init_early update
Update the sh7377 SoC and the G4EVM board to make use of the
functions sh7377_map_io() and sh7377_add_early_devices().
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/board-g4evm.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7377.c | 22 |
3 files changed, 25 insertions, 23 deletions
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c index 2220b885cff..4ba2a79fb18 100644 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ b/arch/arm/mach-shmobile/board-g4evm.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <mach/common.h> | 38 | #include <mach/common.h> |
39 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/time.h> | 41 | #include <asm/mach/time.h> |
43 | 42 | ||
44 | /* | 43 | /* |
@@ -260,27 +259,6 @@ static struct platform_device *g4evm_devices[] __initdata = { | |||
260 | &sdhi1_device, | 259 | &sdhi1_device, |
261 | }; | 260 | }; |
262 | 261 | ||
263 | static struct map_desc g4evm_io_desc[] __initdata = { | ||
264 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
265 | * used by CPGA, INTC and PFC. | ||
266 | */ | ||
267 | { | ||
268 | .virtual = 0xe6000000, | ||
269 | .pfn = __phys_to_pfn(0xe6000000), | ||
270 | .length = 256 << 20, | ||
271 | .type = MT_DEVICE_NONSHARED | ||
272 | }, | ||
273 | }; | ||
274 | |||
275 | static void __init g4evm_map_io(void) | ||
276 | { | ||
277 | iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); | ||
278 | |||
279 | /* setup early devices and console here as well */ | ||
280 | sh7377_add_early_devices(); | ||
281 | shmobile_setup_console(); | ||
282 | } | ||
283 | |||
284 | #define GPIO_SDHID0_D0 0xe60520fc | 262 | #define GPIO_SDHID0_D0 0xe60520fc |
285 | #define GPIO_SDHID0_D1 0xe60520fd | 263 | #define GPIO_SDHID0_D1 0xe60520fd |
286 | #define GPIO_SDHID0_D2 0xe60520fe | 264 | #define GPIO_SDHID0_D2 0xe60520fe |
@@ -408,7 +386,8 @@ static struct sys_timer g4evm_timer = { | |||
408 | }; | 386 | }; |
409 | 387 | ||
410 | MACHINE_START(G4EVM, "g4evm") | 388 | MACHINE_START(G4EVM, "g4evm") |
411 | .map_io = g4evm_map_io, | 389 | .map_io = sh7377_map_io, |
390 | .init_early = sh7377_add_early_devices, | ||
412 | .init_irq = sh7377_init_irq, | 391 | .init_irq = sh7377_init_irq, |
413 | .handle_irq = shmobile_handle_irq_intc, | 392 | .handle_irq = shmobile_handle_irq_intc, |
414 | .init_machine = g4evm_init, | 393 | .init_machine = g4evm_init, |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 3ab6402b7f2..a77f027ccc3 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -23,6 +23,7 @@ extern struct clk sh7367_extalb1_clk; | |||
23 | extern struct clk sh7367_extal2_clk; | 23 | extern struct clk sh7367_extal2_clk; |
24 | 24 | ||
25 | extern void sh7377_init_irq(void); | 25 | extern void sh7377_init_irq(void); |
26 | extern void sh7377_map_io(void); | ||
26 | extern void sh7377_add_early_devices(void); | 27 | extern void sh7377_add_early_devices(void); |
27 | extern void sh7377_add_standard_devices(void); | 28 | extern void sh7377_add_standard_devices(void); |
28 | extern void sh7377_clock_init(void); | 29 | extern void sh7377_clock_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c index bb405b8e459..979cf815c29 100644 --- a/arch/arm/mach-shmobile/setup-sh7377.c +++ b/arch/arm/mach-shmobile/setup-sh7377.c | |||
@@ -30,9 +30,28 @@ | |||
30 | #include <linux/sh_intc.h> | 30 | #include <linux/sh_intc.h> |
31 | #include <linux/sh_timer.h> | 31 | #include <linux/sh_timer.h> |
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/common.h> | ||
34 | #include <asm/mach/map.h> | ||
33 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
35 | 37 | ||
38 | static struct map_desc sh7377_io_desc[] __initdata = { | ||
39 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
40 | * used by CPGA, INTC and PFC. | ||
41 | */ | ||
42 | { | ||
43 | .virtual = 0xe6000000, | ||
44 | .pfn = __phys_to_pfn(0xe6000000), | ||
45 | .length = 256 << 20, | ||
46 | .type = MT_DEVICE_NONSHARED | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | void __init sh7377_map_io(void) | ||
51 | { | ||
52 | iotable_init(sh7377_io_desc, ARRAY_SIZE(sh7377_io_desc)); | ||
53 | } | ||
54 | |||
36 | /* SCIFA0 */ | 55 | /* SCIFA0 */ |
37 | static struct plat_sci_port scif0_platform_data = { | 56 | static struct plat_sci_port scif0_platform_data = { |
38 | .mapbase = 0xe6c40000, | 57 | .mapbase = 0xe6c40000, |
@@ -466,4 +485,7 @@ void __init sh7377_add_early_devices(void) | |||
466 | 485 | ||
467 | early_platform_add_devices(sh7377_early_devices, | 486 | early_platform_add_devices(sh7377_early_devices, |
468 | ARRAY_SIZE(sh7377_early_devices)); | 487 | ARRAY_SIZE(sh7377_early_devices)); |
488 | |||
489 | /* setup early console here as well */ | ||
490 | shmobile_setup_console(); | ||
469 | } | 491 | } |