Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/macppc We used to look for the interrupt con...
details: https://anonhg.NetBSD.org/src/rev/1de80b706c63
branches: trunk
changeset: 567562:1de80b706c63
user: manu <manu%NetBSD.org@localhost>
date: Sun Jun 20 20:50:13 2004 +0000
description:
We used to look for the interrupt controller through the "interrupt-controller"
property of "/chosen" node in OF tree. On newer machines (e.g: iBook G4),
this property does not exist. We look for the node "mpic" as a second attempt
after a failure in /chosen.
This makes the iBook G4 keyboard almost usable (there are still some spurious
inputs on system startupi)
diffstat:
sys/arch/macppc/macppc/extintr.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r a4c5e2f38e52 -r 1de80b706c63 sys/arch/macppc/macppc/extintr.c
--- a/sys/arch/macppc/macppc/extintr.c Sun Jun 20 20:44:06 2004 +0000
+++ b/sys/arch/macppc/macppc/extintr.c Sun Jun 20 20:50:13 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extintr.c,v 1.43 2004/05/12 00:34:25 wiz Exp $ */
+/* $NetBSD: extintr.c,v 1.44 2004/06/20 20:50:13 manu Exp $ */
/*-
* Copyright (c) 2000, 2001 Tsubai Masanari.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.43 2004/05/12 00:34:25 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.44 2004/06/20 20:50:13 manu Exp $");
#include "opt_multiprocessor.h"
@@ -942,9 +942,19 @@
heathrow_FCR = (void *)(obio_base + HEATHROW_FCR_OFFSET);
memset(type, 0, sizeof(type));
- chosen = OF_finddevice("/chosen");
- if (OF_getprop(chosen, "interrupt-controller", &ictlr, 4) == 4)
- OF_getprop(ictlr, "device_type", type, sizeof(type));
+ ictlr = -1;
+
+ /*
+ * Look for The interrupt controller. It used to be referenced
+ * by the "interrupt-controller" property of device "/chosen",
+ * but this is not true anymore on newer machines (e.g.: iBook G4)
+ * Device "mpic" is the interrupt controller on theses machines.
+ */
+ if (((chosen = OF_finddevice("/chosen")) == -1) ||
+ (OF_getprop(chosen, "interrupt-controller", &ictlr, 4) != 4))
+ ictlr = OF_finddevice("mpic");
+
+ OF_getprop(ictlr, "device_type", type, sizeof(type));
if (strcmp(type, "open-pic") != 0) {
/*
Home |
Main Index |
Thread Index |
Old Index