aboutsummaryrefslogtreecommitdiff
path: root/src/ps2port.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-03-13 19:00:02 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-03-13 19:00:02 -0500
commit67a9eeccea205a163cb5633bdbb218461f189004 (patch)
treebd71e47889e1e5288d7de5fd06deb646b46f1a92 /src/ps2port.c
parent6704cf9aa1f7e6bd7405044f222c23459d4b4d93 (diff)
downloadseabios-hppa-67a9eeccea205a163cb5633bdbb218461f189004.zip
seabios-hppa-67a9eeccea205a163cb5633bdbb218461f189004.tar.gz
seabios-hppa-67a9eeccea205a163cb5633bdbb218461f189004.tar.bz2
Prevent ps2 irqs from messing up ps2 init.
This is an alternate to 6f702dd6987b22e9bce472fe61910392af17416a. After disabling ps2 irqs, enable irqs to flush any queued irqs. This should prevent irqs from triggering in the middle of the init process.
Diffstat (limited to 'src/ps2port.c')
-rw-r--r--src/ps2port.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ps2port.c b/src/ps2port.c
index 5422745..71a1ba2 100644
--- a/src/ps2port.c
+++ b/src/ps2port.c
@@ -228,6 +228,9 @@ ps2_command(int aux, int command, u8 *param)
if (ret)
return ret;
+ // Flush any interrupts already pending.
+ yield();
+
if (command == ATKBD_CMD_RESET_BAT) {
// Reset is special wrt timeouts.