Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62394
b: refs/heads/master
c: 8b93789
h: refs/heads/master
v: v3
  • Loading branch information
Truxton Fulton authored and Linus Torvalds committed Jul 22, 2007
1 parent 6d56f15 commit 5576fc5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd78432c8f209a1028f4e5bada8b1da1d8e4da09
refs/heads/master: 8b93789808756bcc1e5c90c99f1b1ef52f839a51
25 changes: 24 additions & 1 deletion trunk/include/asm-i386/mach-default/mach_reboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,37 @@ static inline void kb_wait(void)
static inline void mach_reboot(void)
{
int i;

/* old method, works on most machines */
for (i = 0; i < 10; i++) {
kb_wait();
udelay(50);
outb(0xfe, 0x64); /* pulse reset low */
udelay(50);
}

/* New method: sets the "System flag" which, when set, indicates
* successful completion of the keyboard controller self-test (Basic
* Assurance Test, BAT). This is needed for some machines with no
* keyboard plugged in. This read-modify-write sequence sets only the
* system flag
*/
for (i = 0; i < 10; i++) {
int cmd;

outb(0x20, 0x64); /* read Controller Command Byte */
udelay(50);
kb_wait();
udelay(50);
cmd = inb(0x60);
udelay(50);
kb_wait();
udelay(50);
outb(0x60, 0x64); /* write Controller Command Byte */
udelay(50);
kb_wait();
udelay(50);
outb(0x14, 0x60); /* set "System flag" */
outb(cmd | 0x04, 0x60); /* set "System flag" */
udelay(50);
kb_wait();
udelay(50);
Expand Down

0 comments on commit 5576fc5

Please sign in to comment.