diff options
author | Magnus Damm <damm@opensource.se> | 2012-02-29 07:37:43 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-12 17:19:42 -0400 |
commit | 3e353b875b2480e98acb9ed96a377025d0ed7b82 (patch) | |
tree | 8a8d9af82207f59636ee34a55c0a3a9a27f8d5a6 /arch/arm | |
parent | d3ab7221489fa188b0e1e9bfe2cc4ecd1d7da933 (diff) |
ARM: mach-shmobile: r8a7779 map_io and init_early update
Update the r8a7779 SoC and the Marzen board to make use of
the functions r8a7779_map_io() and r8a7779_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-marzen.c | 48 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 39 |
3 files changed, 42 insertions, 46 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index f0e02c0ce99f..43a77d912b4c 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <mach/common.h> | 33 | #include <mach/common.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
38 | #include <asm/hardware/gic.h> | 37 | #include <asm/hardware/gic.h> |
39 | #include <asm/traps.h> | 38 | #include <asm/traps.h> |
@@ -72,49 +71,6 @@ static struct platform_device *marzen_devices[] __initdata = { | |||
72 | ð_device, | 71 | ð_device, |
73 | }; | 72 | }; |
74 | 73 | ||
75 | static struct map_desc marzen_io_desc[] __initdata = { | ||
76 | /* 2M entity map for 0xf0000000 (MPCORE) */ | ||
77 | { | ||
78 | .virtual = 0xf0000000, | ||
79 | .pfn = __phys_to_pfn(0xf0000000), | ||
80 | .length = SZ_2M, | ||
81 | .type = MT_DEVICE_NONSHARED | ||
82 | }, | ||
83 | /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */ | ||
84 | { | ||
85 | .virtual = 0xfe000000, | ||
86 | .pfn = __phys_to_pfn(0xfe000000), | ||
87 | .length = SZ_16M, | ||
88 | .type = MT_DEVICE_NONSHARED | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static void __init marzen_map_io(void) | ||
93 | { | ||
94 | iotable_init(marzen_io_desc, ARRAY_SIZE(marzen_io_desc)); | ||
95 | } | ||
96 | |||
97 | static void __init marzen_init_early(void) | ||
98 | { | ||
99 | r8a7779_add_early_devices(); | ||
100 | |||
101 | /* Early serial console setup is not included here due to | ||
102 | * memory map collisions. The SCIF serial ports in r8a7779 | ||
103 | * are difficult to entity map 1:1 due to collision with the | ||
104 | * virtual memory range used by the coherent DMA code on ARM. | ||
105 | * | ||
106 | * Anyone wanting to debug early can remove UPF_IOREMAP from | ||
107 | * the sh-sci serial console platform data, adjust mapbase | ||
108 | * to a static M:N virt:phys mapping that needs to be added to | ||
109 | * the mappings passed with iotable_init() above. | ||
110 | * | ||
111 | * Then add a call to shmobile_setup_console() from this function. | ||
112 | * | ||
113 | * As a final step pass earlyprint=sh-sci.2,115200 on the kernel | ||
114 | * command line. | ||
115 | */ | ||
116 | } | ||
117 | |||
118 | static void __init marzen_init(void) | 74 | static void __init marzen_init(void) |
119 | { | 75 | { |
120 | r8a7779_pinmux_init(); | 76 | r8a7779_pinmux_init(); |
@@ -147,8 +103,8 @@ struct sys_timer marzen_timer = { | |||
147 | }; | 103 | }; |
148 | 104 | ||
149 | MACHINE_START(MARZEN, "marzen") | 105 | MACHINE_START(MARZEN, "marzen") |
150 | .map_io = marzen_map_io, | 106 | .map_io = r8a7779_map_io, |
151 | .init_early = marzen_init_early, | 107 | .init_early = r8a7779_add_early_devices, |
152 | .nr_irqs = NR_IRQS_LEGACY, | 108 | .nr_irqs = NR_IRQS_LEGACY, |
153 | .init_irq = r8a7779_init_irq, | 109 | .init_irq = r8a7779_init_irq, |
154 | .handle_irq = gic_handle_irq, | 110 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index deabdf4e36ee..c1b77d588bb3 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -67,6 +67,7 @@ extern void r8a7740_clock_init(u8 md_ck); | |||
67 | extern void r8a7740_pinmux_init(void); | 67 | extern void r8a7740_pinmux_init(void); |
68 | 68 | ||
69 | extern void r8a7779_init_irq(void); | 69 | extern void r8a7779_init_irq(void); |
70 | extern void r8a7779_map_io(void); | ||
70 | extern void r8a7779_add_early_devices(void); | 71 | extern void r8a7779_add_early_devices(void); |
71 | extern void r8a7779_add_standard_devices(void); | 72 | extern void r8a7779_add_standard_devices(void); |
72 | extern void r8a7779_clock_init(void); | 73 | extern void r8a7779_clock_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 4725663bd032..4378b4dea1dc 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -33,6 +33,29 @@ | |||
33 | #include <mach/common.h> | 33 | #include <mach/common.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | ||
37 | |||
38 | static struct map_desc r8a7779_io_desc[] __initdata = { | ||
39 | /* 2M entity map for 0xf0000000 (MPCORE) */ | ||
40 | { | ||
41 | .virtual = 0xf0000000, | ||
42 | .pfn = __phys_to_pfn(0xf0000000), | ||
43 | .length = SZ_2M, | ||
44 | .type = MT_DEVICE_NONSHARED | ||
45 | }, | ||
46 | /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */ | ||
47 | { | ||
48 | .virtual = 0xfe000000, | ||
49 | .pfn = __phys_to_pfn(0xfe000000), | ||
50 | .length = SZ_16M, | ||
51 | .type = MT_DEVICE_NONSHARED | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | void __init r8a7779_map_io(void) | ||
56 | { | ||
57 | iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); | ||
58 | } | ||
36 | 59 | ||
37 | static struct plat_sci_port scif0_platform_data = { | 60 | static struct plat_sci_port scif0_platform_data = { |
38 | .mapbase = 0xffe40000, | 61 | .mapbase = 0xffe40000, |
@@ -236,4 +259,20 @@ void __init r8a7779_add_early_devices(void) | |||
236 | { | 259 | { |
237 | early_platform_add_devices(r8a7779_early_devices, | 260 | early_platform_add_devices(r8a7779_early_devices, |
238 | ARRAY_SIZE(r8a7779_early_devices)); | 261 | ARRAY_SIZE(r8a7779_early_devices)); |
262 | |||
263 | /* Early serial console setup is not included here due to | ||
264 | * memory map collisions. The SCIF serial ports in r8a7779 | ||
265 | * are difficult to entity map 1:1 due to collision with the | ||
266 | * virtual memory range used by the coherent DMA code on ARM. | ||
267 | * | ||
268 | * Anyone wanting to debug early can remove UPF_IOREMAP from | ||
269 | * the sh-sci serial console platform data, adjust mapbase | ||
270 | * to a static M:N virt:phys mapping that needs to be added to | ||
271 | * the mappings passed with iotable_init() above. | ||
272 | * | ||
273 | * Then add a call to shmobile_setup_console() from this function. | ||
274 | * | ||
275 | * As a final step pass earlyprint=sh-sci.2,115200 on the kernel | ||
276 | * command line in case of the marzen board. | ||
277 | */ | ||
239 | } | 278 | } |