at91rm9200.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * arch/arm/mach-at91/at91rm9200.c
  3. *
  4. * Copyright (C) 2005 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 <linux/module.h>
  13. #include <linux/clk/at91_pmc.h>
  14. #include <asm/mach/map.h>
  15. #include <asm/system_misc.h>
  16. #include <mach/at91_st.h>
  17. #include <mach/hardware.h>
  18. #include "soc.h"
  19. #include "generic.h"
  20. static void at91rm9200_idle(void)
  21. {
  22. /*
  23. * Disable the processor clock. The processor will be automatically
  24. * re-enabled by an interrupt or by a reset.
  25. */
  26. at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
  27. }
  28. static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
  29. {
  30. /*
  31. * Perform a hardware reset with the use of the Watchdog timer.
  32. */
  33. at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
  34. at91_st_write(AT91_ST_CR, AT91_ST_WDRST);
  35. }
  36. /* --------------------------------------------------------------------
  37. * AT91RM9200 processor initialization
  38. * -------------------------------------------------------------------- */
  39. static void __init at91rm9200_map_io(void)
  40. {
  41. /* Map peripherals */
  42. at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE);
  43. }
  44. static void __init at91rm9200_initialize(void)
  45. {
  46. arm_pm_idle = at91rm9200_idle;
  47. arm_pm_restart = at91rm9200_restart;
  48. }
  49. AT91_SOC_START(at91rm9200)
  50. .map_io = at91rm9200_map_io,
  51. .init = at91rm9200_initialize,
  52. AT91_SOC_END