Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc Enable a fix so that PowerBook(FireWire) key...
details: https://anonhg.NetBSD.org/src/rev/c94f6d7da164
branches: trunk
changeset: 504312:c94f6d7da164
user: matt <matt%NetBSD.org@localhost>
date: Tue Feb 27 07:33:17 2001 +0000
description:
Enable a fix so that PowerBook(FireWire) keyboards work. This
should also work on iBooks and PowerBook(WallStreet). And if
we're really lucky, on the new G4 laptops.
diffstat:
sys/arch/macppc/conf/GENERIC | 6 ++++--
sys/arch/macppc/dev/pm_direct.c | 29 ++++++++++++++++++++++++++++-
2 files changed, 32 insertions(+), 3 deletions(-)
diffs (69 lines):
diff -r 082987dcdf69 -r c94f6d7da164 sys/arch/macppc/conf/GENERIC
--- a/sys/arch/macppc/conf/GENERIC Tue Feb 27 06:16:06 2001 +0000
+++ b/sys/arch/macppc/conf/GENERIC Tue Feb 27 07:33:17 2001 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: GENERIC,v 1.91 2001/01/16 03:38:23 augustss Exp $
+# $NetBSD: GENERIC,v 1.92 2001/02/27 07:33:17 matt Exp $
#
# GENERIC -- everything that's currently supported
#
include "arch/macppc/conf/std.macppc"
-#ident "GENERIC-$Revision: 1.91 $"
+#ident "GENERIC-$Revision: 1.92 $"
maxusers 32
@@ -176,6 +176,8 @@
esp* at obio? flags 0x00ff # 53c9x SCSI
mesh* at obio? flags 0xffff # MESH SCSI
nvram* at obio? # nvram
+gpio* at obio? # gpio
+gpio* at gpio? # extint
adb* at obio? # Apple Desktop Bus
aed* at adb? # ADB Event Device
akbd* at adb? # ADB keyboard
diff -r 082987dcdf69 -r c94f6d7da164 sys/arch/macppc/dev/pm_direct.c
--- a/sys/arch/macppc/dev/pm_direct.c Tue Feb 27 06:16:06 2001 +0000
+++ b/sys/arch/macppc/dev/pm_direct.c Tue Feb 27 07:33:17 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */
+/* $NetBSD: pm_direct.c,v 1.10 2001/02/27 07:33:18 matt Exp $ */
/*
* Copyright (C) 1997 Takashi Hamada
@@ -831,6 +831,33 @@
s = splhigh();
+ for (;;) {
+ u_int ifr;
+ ifr = read_via_reg(VIA1, vIFR);
+
+ if (ifr == 0)
+ break;
+
+ if (ifr & V1IF_ADBRDY) {
+ write_via_reg(VIA1, vIFR, V1IF_ADBRDY);
+ ifr &= ~V1IF_ADBRDY;
+ delay(120000); /* XXX */
+ } else if (ifr & V1IF_ADBCLK) {
+ write_via_reg(VIA1, vIFR, V1IF_ADBCLK);
+ ifr &= ~V1IF_ADBCLK;
+ }
+
+ if (ifr)
+ write_via_reg(VIA1, vIFR, ifr);
+ }
+
+#if 0
+ gpio = in8(gpio_reg + 0x9);
+ if ((gpio & 0x02) != 0) {
+ splx(s);
+ return;
+ }
+#endif
PM_VIA_CLR_INTR(); /* clear VIA1 interrupt */
/* ask PM what happend */
pmdata.command = 0x78;
Home |
Main Index |
Thread Index |
Old Index