diff options
Diffstat (limited to 'arch/arm/mach-at91/setup.c')
-rw-r--r-- | arch/arm/mach-at91/setup.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 43251efd90d4..816599fce55b 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -45,6 +45,26 @@ void __init at91_init_interrupts(unsigned int *priority) | |||
45 | at91_gpio_irq_setup(); | 45 | at91_gpio_irq_setup(); |
46 | } | 46 | } |
47 | 47 | ||
48 | static struct map_desc sram_desc[2] __initdata; | ||
49 | |||
50 | void __init at91_init_sram(int bank, unsigned long base, unsigned int length) | ||
51 | { | ||
52 | struct map_desc *desc = &sram_desc[bank]; | ||
53 | |||
54 | desc->virtual = AT91_IO_VIRT_BASE - length; | ||
55 | if (bank > 0) | ||
56 | desc->virtual -= sram_desc[bank - 1].length; | ||
57 | |||
58 | desc->pfn = __phys_to_pfn(base); | ||
59 | desc->length = length; | ||
60 | desc->type = MT_DEVICE; | ||
61 | |||
62 | pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", | ||
63 | base, length, desc->virtual); | ||
64 | |||
65 | iotable_init(desc, 1); | ||
66 | } | ||
67 | |||
48 | static struct map_desc at91_io_desc __initdata = { | 68 | static struct map_desc at91_io_desc __initdata = { |
49 | .virtual = AT91_VA_BASE_SYS, | 69 | .virtual = AT91_VA_BASE_SYS, |
50 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | 70 | .pfn = __phys_to_pfn(AT91_BASE_SYS), |