reset.c 771 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * You should have received a copy of the GNU General Public License along
  10. * with this program; if not, write to the Free Software Foundation, Inc.,
  11. * 675 Mass Ave, Cambridge, MA 02139, USA.
  12. *
  13. */
  14. #include <asm/reboot.h>
  15. #include "reset.h"
  16. static void jz4740_halt(void)
  17. {
  18. while (1) {
  19. __asm__(".set push;\n"
  20. ".set mips3;\n"
  21. "wait;\n"
  22. ".set pop;\n"
  23. );
  24. }
  25. }
  26. void jz4740_reset_init(void)
  27. {
  28. _machine_halt = jz4740_halt;
  29. }