Merge tag 'renesas-soc-fixes3-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / arm / mach-at91 / at91sam9rl.c
1 /*
2  * arch/arm/mach-at91/at91sam9rl.c
3  *
4  *  Copyright (C) 2005 SAN People
5  *  Copyright (C) 2007 Atmel Corporation
6  *
7  * This file is subject to the terms and conditions of the GNU General Public
8  * License.  See the file COPYING in the main directory of this archive for
9  * more details.
10  */
11
12 #include <asm/system_misc.h>
13 #include <asm/irq.h>
14 #include <mach/cpu.h>
15 #include <mach/at91_dbgu.h>
16 #include <mach/hardware.h>
17
18 #include "soc.h"
19 #include "generic.h"
20
21 /* --------------------------------------------------------------------
22  *  AT91SAM9RL processor initialization
23  * -------------------------------------------------------------------- */
24
25 static void __init at91sam9rl_map_io(void)
26 {
27         unsigned long sram_size;
28
29         switch (at91_soc_initdata.cidr & AT91_CIDR_SRAMSIZ) {
30                 case AT91_CIDR_SRAMSIZ_32K:
31                         sram_size = 2 * SZ_16K;
32                         break;
33                 case AT91_CIDR_SRAMSIZ_16K:
34                 default:
35                         sram_size = SZ_16K;
36         }
37
38         /* Map SRAM */
39         at91_init_sram(0, AT91SAM9RL_SRAM_BASE, sram_size);
40 }
41
42 static void __init at91sam9rl_initialize(void)
43 {
44         arm_pm_idle = at91sam9_idle;
45
46         at91_sysirq_mask_rtc(AT91SAM9RL_BASE_RTC);
47         at91_sysirq_mask_rtt(AT91SAM9RL_BASE_RTT);
48 }
49
50 AT91_SOC_START(at91sam9rl)
51         .map_io = at91sam9rl_map_io,
52         .init = at91sam9rl_initialize,
53 AT91_SOC_END