reset.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * reset.c: reset support for PNX833X.
  3. *
  4. * Copyright 2008 NXP Semiconductors
  5. * Chris Steel <chris.steel@nxp.com>
  6. * Daniel Laird <daniel.j.laird@nxp.com>
  7. *
  8. * Based on software written by:
  9. * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. */
  25. #include <linux/reboot.h>
  26. #include <pnx833x.h>
  27. void pnx833x_machine_restart(char *command)
  28. {
  29. PNX833X_RESET_CONTROL_2 = 0;
  30. PNX833X_RESET_CONTROL = 0;
  31. }
  32. void pnx833x_machine_halt(void)
  33. {
  34. while (1)
  35. __asm__ __volatile__ ("wait");
  36. }
  37. void pnx833x_machine_power_off(void)
  38. {
  39. pnx833x_machine_halt();
  40. }