aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-02-29 07:37:35 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2012-03-12 17:19:42 -0400
commitd3ab7221489fa188b0e1e9bfe2cc4ecd1d7da933 (patch)
treede68928b16a10c7c91f8acf7ca277ff9e3fdf27d /arch/arm
parent50e15c34f0072324fee9faaae71b129e8b419913 (diff)
ARM: mach-shmobile: r8a7740 map_io and init_early update
Update the r8a7740 SoC and the Bonito board to make use of the functions r8a7740_map_io() and r8a7740_add_early_devices(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c28
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c35
3 files changed, 38 insertions, 26 deletions
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index 4d2201622323..e39fa08731bf 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -327,28 +327,6 @@ static struct platform_device *bonito_base_devices[] __initdata = {
327 * map I/O 327 * map I/O
328 */ 328 */
329static struct map_desc bonito_io_desc[] __initdata = { 329static struct map_desc bonito_io_desc[] __initdata = {
330 /*
331 * for CPGA/INTC/PFC
332 * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
333 */
334 {
335 .virtual = 0xe6000000,
336 .pfn = __phys_to_pfn(0xe6000000),
337 .length = 160 << 20,
338 .type = MT_DEVICE_NONSHARED
339 },
340#ifdef CONFIG_CACHE_L2X0
341 /*
342 * for l2x0_init()
343 * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
344 */
345 {
346 .virtual = 0xf0002000,
347 .pfn = __phys_to_pfn(0xf0100000),
348 .length = PAGE_SIZE,
349 .type = MT_DEVICE_NONSHARED
350 },
351#endif
352 /* 330 /*
353 * for FPGA (0x1800000-0x19ffffff) 331 * for FPGA (0x1800000-0x19ffffff)
354 * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000 332 * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000
@@ -363,11 +341,8 @@ static struct map_desc bonito_io_desc[] __initdata = {
363 341
364static void __init bonito_map_io(void) 342static void __init bonito_map_io(void)
365{ 343{
344 r8a7740_map_io();
366 iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc)); 345 iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc));
367
368 /* setup early devices and console here as well */
369 r8a7740_add_early_devices();
370 shmobile_setup_console();
371} 346}
372 347
373/* 348/*
@@ -515,6 +490,7 @@ struct sys_timer bonito_timer = {
515 490
516MACHINE_START(BONITO, "bonito") 491MACHINE_START(BONITO, "bonito")
517 .map_io = bonito_map_io, 492 .map_io = bonito_map_io,
493 .init_early = r8a7740_add_early_devices,
518 .init_irq = r8a7740_init_irq, 494 .init_irq = r8a7740_init_irq,
519 .handle_irq = shmobile_handle_irq_intc, 495 .handle_irq = shmobile_handle_irq_intc,
520 .init_machine = bonito_init, 496 .init_machine = bonito_init,
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index a0e0cfb4c545..deabdf4e36ee 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -60,6 +60,7 @@ extern int sh73a0_boot_secondary(unsigned int cpu);
60extern void sh73a0_smp_prepare_cpus(void); 60extern void sh73a0_smp_prepare_cpus(void);
61 61
62extern void r8a7740_init_irq(void); 62extern void r8a7740_init_irq(void);
63extern void r8a7740_map_io(void);
63extern void r8a7740_add_early_devices(void); 64extern void r8a7740_add_early_devices(void);
64extern void r8a7740_add_standard_devices(void); 65extern void r8a7740_add_standard_devices(void);
65extern void r8a7740_clock_init(u8 md_ck); 66extern void r8a7740_clock_init(u8 md_ck);
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 986dca6b3fad..dbc30670a27f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -25,9 +25,41 @@
25#include <linux/serial_sci.h> 25#include <linux/serial_sci.h>
26#include <linux/sh_timer.h> 26#include <linux/sh_timer.h>
27#include <mach/r8a7740.h> 27#include <mach/r8a7740.h>
28#include <mach/common.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/map.h>
29#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
30 32
33static struct map_desc r8a7740_io_desc[] __initdata = {
34 /*
35 * for CPGA/INTC/PFC
36 * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
37 */
38 {
39 .virtual = 0xe6000000,
40 .pfn = __phys_to_pfn(0xe6000000),
41 .length = 160 << 20,
42 .type = MT_DEVICE_NONSHARED
43 },
44#ifdef CONFIG_CACHE_L2X0
45 /*
46 * for l2x0_init()
47 * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
48 */
49 {
50 .virtual = 0xf0002000,
51 .pfn = __phys_to_pfn(0xf0100000),
52 .length = PAGE_SIZE,
53 .type = MT_DEVICE_NONSHARED
54 },
55#endif
56};
57
58void __init r8a7740_map_io(void)
59{
60 iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
61}
62
31/* SCIFA0 */ 63/* SCIFA0 */
32static struct plat_sci_port scif0_platform_data = { 64static struct plat_sci_port scif0_platform_data = {
33 .mapbase = 0xe6c40000, 65 .mapbase = 0xe6c40000,
@@ -349,4 +381,7 @@ void __init r8a7740_add_early_devices(void)
349{ 381{
350 early_platform_add_devices(r8a7740_early_devices, 382 early_platform_add_devices(r8a7740_early_devices,
351 ARRAY_SIZE(r8a7740_early_devices)); 383 ARRAY_SIZE(r8a7740_early_devices));
384
385 /* setup early console here as well */
386 shmobile_setup_console();
352} 387}