at91sam9260.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * arch/arm/mach-at91/at91sam9260.c
  3. *
  4. * Copyright (C) 2006 SAN People
  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. #include <asm/system_misc.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. * AT91SAM9260 processor initialization
  20. * -------------------------------------------------------------------- */
  21. static void __init at91sam9xe_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. at91_init_sram(0, AT91SAM9XE_SRAM_BASE, sram_size);
  33. }
  34. static void __init at91sam9260_map_io(void)
  35. {
  36. if (cpu_is_at91sam9xe())
  37. at91sam9xe_map_io();
  38. else if (cpu_is_at91sam9g20())
  39. at91_init_sram(0, AT91SAM9G20_SRAM_BASE, AT91SAM9G20_SRAM_SIZE);
  40. else
  41. at91_init_sram(0, AT91SAM9260_SRAM_BASE, AT91SAM9260_SRAM_SIZE);
  42. }
  43. static void __init at91sam9260_initialize(void)
  44. {
  45. arm_pm_idle = at91sam9_idle;
  46. at91_sysirq_mask_rtt(AT91SAM9260_BASE_RTT);
  47. }
  48. AT91_SOC_START(at91sam9260)
  49. .map_io = at91sam9260_map_io,
  50. .init = at91sam9260_initialize,
  51. AT91_SOC_END