diff options
author | Truxton Fulton <trux@truxton.com> | 2005-09-09 16:02:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:57:35 -0400 |
commit | 59f4e7d572980a521b7bdba74ab71b21f5995538 (patch) | |
tree | 65004b9875c8fa830de2879229ecf871de5525f4 /include/asm-i386/mach-default/mach_reboot.h | |
parent | 6e8dcee3e63f5a2cba4affff4bbb6e228f4b258a (diff) |
[PATCH] fix reboot via keyboard controller reset
I have a system (Biostar IDEQ210M mini-pc with a VIA chipset) which will
not reboot unless a keyboard is plugged in to it. I have tried all
combinations of the kernel "reboot=x,y" flags to no avail. Rebooting by
any method will leave the system in a wedged state (at the "Restarting
system" message).
I finally tracked the problem down to the machine's refusal to fully reboot
unless the keyboard controller status register had bit 2 set. This is the
"System flag" which when set, indicates successful completion of the
keyboard controller self-test (Basic Assurance Test, BAT).
I suppose that something is trying to protect against sporadic reboots
unless the keyboard controller is in a good state (a keyboard is present),
but I need this machine to be headless.
I found that setting the system flag (via the command byte) before giving
the "pulse reset line" command will allow the reboot to proceed. The patch
is simple, and I think it should be fine for everybody whether they have
this type of machine or not. This affects the "hard" reboot (as done when
the kernel boot flags "reboot=c,h" are used).
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/mach-default/mach_reboot.h')
-rw-r--r-- | include/asm-i386/mach-default/mach_reboot.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/asm-i386/mach-default/mach_reboot.h b/include/asm-i386/mach-default/mach_reboot.h index 521e227db679..06ae4d81ba6a 100644 --- a/include/asm-i386/mach-default/mach_reboot.h +++ b/include/asm-i386/mach-default/mach_reboot.h | |||
@@ -22,7 +22,15 @@ static inline void mach_reboot(void) | |||
22 | for (i = 0; i < 100; i++) { | 22 | for (i = 0; i < 100; i++) { |
23 | kb_wait(); | 23 | kb_wait(); |
24 | udelay(50); | 24 | udelay(50); |
25 | outb(0xfe, 0x64); /* pulse reset low */ | 25 | outb(0x60, 0x64); /* write Controller Command Byte */ |
26 | udelay(50); | ||
27 | kb_wait(); | ||
28 | udelay(50); | ||
29 | outb(0x14, 0x60); /* set "System flag" */ | ||
30 | udelay(50); | ||
31 | kb_wait(); | ||
32 | udelay(50); | ||
33 | outb(0xfe, 0x64); /* pulse reset low */ | ||
26 | udelay(50); | 34 | udelay(50); |
27 | } | 35 | } |
28 | } | 36 | } |