system.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2005 Sigmatel Inc
  3. *
  4. * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
  5. * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  6. */
  7. /*
  8. * The code contained herein is licensed under the GNU General Public
  9. * License. You may obtain a copy of the GNU General Public License
  10. * Version 2 or later at the following locations:
  11. *
  12. * http://www.opensource.org/licenses/gpl-license.html
  13. * http://www.gnu.org/copyleft/gpl.html
  14. */
  15. #ifndef __ASM_ARCH_SYSTEM_H
  16. #define __ASM_ARCH_SYSTEM_H
  17. #include <asm/proc-fns.h>
  18. #include <mach/regs-clkctrl.h>
  19. #include <mach/regs-power.h>
  20. static inline void arch_idle(void)
  21. {
  22. /*
  23. * This should do all the clock switching
  24. * and wait for interrupt tricks
  25. */
  26. cpu_do_idle();
  27. }
  28. static inline void arch_reset(char mode, const char *cmd)
  29. {
  30. /* Set BATTCHRG to default value */
  31. HW_POWER_CHARGE_WR(0x00010000);
  32. /* Set MINPWR to default value */
  33. HW_POWER_MINPWR_WR(0);
  34. /* Reset digital side of chip (but not power or RTC) */
  35. HW_CLKCTRL_RESET_WR(BM_CLKCTRL_RESET_DIG);
  36. /* Should not return */
  37. }
  38. #endif