mach_reboot.h 537 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * arch/i386/mach-generic/mach_reboot.h
  3. *
  4. * Machine specific reboot functions for generic.
  5. * Split out from reboot.c by Osamu Tomita <tomita@cinet.co.jp>
  6. */
  7. #ifndef _MACH_REBOOT_H
  8. #define _MACH_REBOOT_H
  9. static inline void kb_wait(void)
  10. {
  11. int i;
  12. for (i = 0; i < 0x10000; i++)
  13. if ((inb_p(0x64) & 0x02) == 0)
  14. break;
  15. }
  16. static inline void mach_reboot(void)
  17. {
  18. int i;
  19. for (i = 0; i < 100; i++) {
  20. kb_wait();
  21. udelay(50);
  22. outb(0xfe, 0x64); /* pulse reset low */
  23. udelay(50);
  24. }
  25. }
  26. #endif /* !_MACH_REBOOT_H */