aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91rm9200.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200.c')
-rw-r--r--arch/arm/mach-at91/at91rm9200.c47
1 files changed, 10 insertions, 37 deletions
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 83a1a3fee554..f73302dbc6a5 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -20,25 +20,16 @@
20#include <mach/at91_st.h> 20#include <mach/at91_st.h>
21#include <mach/cpu.h> 21#include <mach/cpu.h>
22 22
23#include "soc.h"
23#include "generic.h" 24#include "generic.h"
24#include "clock.h" 25#include "clock.h"
25 26
26static struct map_desc at91rm9200_io_desc[] __initdata = { 27static struct map_desc at91rm9200_io_desc[] __initdata = {
27 { 28 {
28 .virtual = AT91_VA_BASE_SYS,
29 .pfn = __phys_to_pfn(AT91_BASE_SYS),
30 .length = SZ_4K,
31 .type = MT_DEVICE,
32 }, {
33 .virtual = AT91_VA_BASE_EMAC, 29 .virtual = AT91_VA_BASE_EMAC,
34 .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), 30 .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC),
35 .length = SZ_16K, 31 .length = SZ_16K,
36 .type = MT_DEVICE, 32 .type = MT_DEVICE,
37 }, {
38 .virtual = AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE,
39 .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE),
40 .length = AT91RM9200_SRAM_SIZE,
41 .type = MT_DEVICE,
42 }, 33 },
43}; 34};
44 35
@@ -304,24 +295,17 @@ static void at91rm9200_reset(void)
304 at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); 295 at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
305} 296}
306 297
307int rm9200_type;
308EXPORT_SYMBOL(rm9200_type);
309
310void __init at91rm9200_set_type(int type)
311{
312 rm9200_type = type;
313}
314
315/* -------------------------------------------------------------------- 298/* --------------------------------------------------------------------
316 * AT91RM9200 processor initialization 299 * AT91RM9200 processor initialization
317 * -------------------------------------------------------------------- */ 300 * -------------------------------------------------------------------- */
318void __init at91rm9200_map_io(void) 301static void __init at91rm9200_map_io(void)
319{ 302{
320 /* Map peripherals */ 303 /* Map peripherals */
304 at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE);
321 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); 305 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
322} 306}
323 307
324void __init at91rm9200_initialize(unsigned long main_clock) 308static void __init at91rm9200_initialize(void)
325{ 309{
326 at91_arch_reset = at91rm9200_reset; 310 at91_arch_reset = at91rm9200_reset;
327 at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) 311 at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
@@ -329,12 +313,6 @@ void __init at91rm9200_initialize(unsigned long main_clock)
329 | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) 313 | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
330 | (1 << AT91RM9200_ID_IRQ6); 314 | (1 << AT91RM9200_ID_IRQ6);
331 315
332 /* Init clock subsystem */
333 at91_clock_init(main_clock);
334
335 /* Register the processor-specific clocks */
336 at91rm9200_register_clocks();
337
338 /* Initialize GPIO subsystem */ 316 /* Initialize GPIO subsystem */
339 at91_gpio_init(at91rm9200_gpio, 317 at91_gpio_init(at91rm9200_gpio,
340 cpu_is_at91rm9200_bga() ? AT91RM9200_BGA : AT91RM9200_PQFP); 318 cpu_is_at91rm9200_bga() ? AT91RM9200_BGA : AT91RM9200_PQFP);
@@ -383,14 +361,9 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
383 0 /* Advanced Interrupt Controller (IRQ6) */ 361 0 /* Advanced Interrupt Controller (IRQ6) */
384}; 362};
385 363
386void __init at91rm9200_init_interrupts(unsigned int priority[NR_AIC_IRQS]) 364struct at91_init_soc __initdata at91rm9200_soc = {
387{ 365 .map_io = at91rm9200_map_io,
388 if (!priority) 366 .default_irq_priority = at91rm9200_default_irq_priority,
389 priority = at91rm9200_default_irq_priority; 367 .register_clocks = at91rm9200_register_clocks,
390 368 .init = at91rm9200_initialize,
391 /* Initialize the AIC interrupt controller */ 369};
392 at91_aic_init(priority);
393
394 /* Enable GPIO interrupts */
395 at91_gpio_irq_setup();
396}