blob: b6117bea9a6f2a4333028bff3000080b39380645 [file] [log] [blame]
Nicolas Ferre789b23b2009-06-26 15:36:58 +01001/*
2 * Chip-specific setup code for the AT91SAM9G45 family
3 *
4 * Copyright (C) 2009 Atmel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
David Howells9f97da72012-03-28 18:30:01 +010013#include <asm/system_misc.h>
Olof Johansson6ac8d682014-11-08 22:39:51 -080014#include <asm/irq.h>
Uwe Kleine-Königac11a1d2013-11-14 10:49:19 +010015#include <mach/hardware.h>
Nicolas Ferre789b23b2009-06-26 15:36:58 +010016
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +080017#include "soc.h"
Nicolas Ferre789b23b2009-06-26 15:36:58 +010018#include "generic.h"
Nicolas Ferre789b23b2009-06-26 15:36:58 +010019
Nicolas Ferre789b23b2009-06-26 15:36:58 +010020/* --------------------------------------------------------------------
21 * AT91SAM9G45 processor initialization
22 * -------------------------------------------------------------------- */
23
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +080024static void __init at91sam9g45_map_io(void)
Nicolas Ferre789b23b2009-06-26 15:36:58 +010025{
Jean-Christophe PLAGNIOL-VILLARDf0051d82011-05-10 03:20:09 +080026 at91_init_sram(0, AT91SAM9G45_SRAM_BASE, AT91SAM9G45_SRAM_SIZE);
Jean-Christophe PLAGNIOL-VILLARD1b021a32011-04-28 20:19:32 +080027}
Nicolas Ferre789b23b2009-06-26 15:36:58 +010028
Jean-Christophe PLAGNIOL-VILLARD46539372011-04-24 18:20:28 +080029static void __init at91sam9g45_initialize(void)
Jean-Christophe PLAGNIOL-VILLARD1b021a32011-04-28 20:19:32 +080030{
Jean-Christophe PLAGNIOL-VILLARD0d781712012-02-05 20:25:32 +080031 arm_pm_idle = at91sam9_idle;
Nicolas Ferre789b23b2009-06-26 15:36:58 +010032
Johan Hovold6de714c2013-10-16 11:56:14 +020033 at91_sysirq_mask_rtc(AT91SAM9G45_BASE_RTC);
Johan Hovold94c4c792013-10-16 11:56:15 +020034 at91_sysirq_mask_rtt(AT91SAM9G45_BASE_RTT);
Nicolas Ferre789b23b2009-06-26 15:36:58 +010035}
36
Ludovic Desroches84ddb082013-03-22 13:24:09 +000037AT91_SOC_START(at91sam9g45)
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +080038 .map_io = at91sam9g45_map_io,
39 .init = at91sam9g45_initialize,
Jean-Christophe PLAGNIOL-VILLARD8d39e0fd02012-08-16 17:36:55 +080040AT91_SOC_END