at91sam9rl.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #include <asm/system_misc.h>
  12. #include <asm/irq.h>
  13. #include <mach/cpu.h>
  14. #include <mach/at91_dbgu.h>
  15. #include <mach/hardware.h>
  16. #include "soc.h"
  17. #include "generic.h"
  18. /* --------------------------------------------------------------------
  19. * AT91SAM9RL processor initialization
  20. * -------------------------------------------------------------------- */
  21. static void __init at91sam9rl_map_io(void)
  22. {
  23. unsigned long sram_size;
  24. switch (at91_soc_initdata.cidr & AT91_CIDR_SRAMSIZ) {
  25. case AT91_CIDR_SRAMSIZ_32K:
  26. sram_size = 2 * SZ_16K;
  27. break;
  28. case AT91_CIDR_SRAMSIZ_16K:
  29. default:
  30. sram_size = SZ_16K;
  31. }
  32. /* Map SRAM */
  33. at91_init_sram(0, AT91SAM9RL_SRAM_BASE, sram_size);
  34. }
  35. static void __init at91sam9rl_initialize(void)
  36. {
  37. arm_pm_idle = at91sam9_idle;
  38. at91_sysirq_mask_rtc(AT91SAM9RL_BASE_RTC);
  39. at91_sysirq_mask_rtt(AT91SAM9RL_BASE_RTT);
  40. }
  41. AT91_SOC_START(at91sam9rl)
  42. .map_io = at91sam9rl_map_io,
  43. .init = at91sam9rl_initialize,
  44. AT91_SOC_END