aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261.c
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2009-06-26 10:37:01 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-07-02 10:59:56 -0400
commitb319ff80852e823c3a18778c839151784990f80b (patch)
tree584b8317df2d93d9dd65b9d92bc835b1e53f816a /arch/arm/mach-at91/at91sam9261.c
parentb784b7c03723891876c9053c589150a4062f9455 (diff)
[ARM] 5570/1: at91: Support for at91sam9g10: core chip & board support
From: Hong Xu <hong.xu@atmel.com> Here are the modification to at91sam9261 files dedicated to the support of at91sam9g10. This direction has been adopted to minimize code duplication. All at91sam9261 drivers are enabled in _devices and board- files. Modificaton to peripherals that support at91sam9g10 will be added in future patches. Signed-off-by: Hong Xu <hong.xu@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261.c')
-rw-r--r--arch/arm/mach-at91/at91sam9261.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 3acd7d7e6a42..4ecf37996c77 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -16,6 +16,7 @@
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19#include <mach/cpu.h>
19#include <mach/at91sam9261.h> 20#include <mach/at91sam9261.h>
20#include <mach/at91_pmc.h> 21#include <mach/at91_pmc.h>
21#include <mach/at91_rstc.h> 22#include <mach/at91_rstc.h>
@@ -30,7 +31,11 @@ static struct map_desc at91sam9261_io_desc[] __initdata = {
30 .pfn = __phys_to_pfn(AT91_BASE_SYS), 31 .pfn = __phys_to_pfn(AT91_BASE_SYS),
31 .length = SZ_16K, 32 .length = SZ_16K,
32 .type = MT_DEVICE, 33 .type = MT_DEVICE,
33 }, { 34 },
35};
36
37static struct map_desc at91sam9261_sram_desc[] __initdata = {
38 {
34 .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, 39 .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE,
35 .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), 40 .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE),
36 .length = AT91SAM9261_SRAM_SIZE, 41 .length = AT91SAM9261_SRAM_SIZE,
@@ -38,6 +43,15 @@ static struct map_desc at91sam9261_io_desc[] __initdata = {
38 }, 43 },
39}; 44};
40 45
46static struct map_desc at91sam9g10_sram_desc[] __initdata = {
47 {
48 .virtual = AT91_IO_VIRT_BASE - AT91SAM9G10_SRAM_SIZE,
49 .pfn = __phys_to_pfn(AT91SAM9G10_SRAM_BASE),
50 .length = AT91SAM9G10_SRAM_SIZE,
51 .type = MT_DEVICE,
52 },
53};
54
41/* -------------------------------------------------------------------- 55/* --------------------------------------------------------------------
42 * Clocks 56 * Clocks
43 * -------------------------------------------------------------------- */ 57 * -------------------------------------------------------------------- */
@@ -263,6 +277,12 @@ void __init at91sam9261_initialize(unsigned long main_clock)
263 /* Map peripherals */ 277 /* Map peripherals */
264 iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); 278 iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
265 279
280 if (cpu_is_at91sam9g10())
281 iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc));
282 else
283 iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
284
285
266 at91_arch_reset = at91sam9261_reset; 286 at91_arch_reset = at91sam9261_reset;
267 pm_power_off = at91sam9261_poweroff; 287 pm_power_off = at91sam9261_poweroff;
268 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) 288 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)