Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch/macppc/dev Pullup 1.3 [tsubai, mycroft]:



details:   https://anonhg.NetBSD.org/src/rev/d6978c38e70d
branches:  netbsd-1-5
changeset: 490077:d6978c38e70d
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 01 16:24:36 2000 +0000

description:
Pullup 1.3 [tsubai, mycroft]:
New PowerBook (firewire) seems to use edge-triggered interrupt.
XXX cannot hot-plug yet

diffstat:

 sys/arch/macppc/dev/mediabay.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 7ceee8020d51 -r d6978c38e70d sys/arch/macppc/dev/mediabay.c
--- a/sys/arch/macppc/dev/mediabay.c    Wed Nov 01 16:24:01 2000 +0000
+++ b/sys/arch/macppc/dev/mediabay.c    Wed Nov 01 16:24:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mediabay.c,v 1.2 1999/10/04 22:58:10 tsubai Exp $      */
+/*     $NetBSD: mediabay.c,v 1.2.12.1 2000/11/01 16:24:36 tv Exp $     */
 
 /*-
  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
@@ -100,7 +100,7 @@
 {
        struct mediabay_softc *sc = (struct mediabay_softc *)self;
        struct confargs *ca = aux;
-       int irq;
+       int irq, type;
 
        ca->ca_reg[0] += ca->ca_baseaddr;
 
@@ -109,9 +109,13 @@
        sc->sc_node = ca->ca_node;
        sc->sc_baseaddr = ca->ca_baseaddr;
        irq = ca->ca_intr[0];
+       type = IST_LEVEL;
 
-       printf(" irq %d\n", irq);
-       intr_establish(irq, IST_LEVEL, IPL_BIO, mediabay_intr, sc);
+       if (ca->ca_nintr == 8 && ca->ca_intr[1] == 0)
+               type = IST_EDGE;
+
+       printf(" irq %d %s\n", irq, intr_typename(type));
+       intr_establish(irq, type, IPL_BIO, mediabay_intr, sc);
 
        kthread_create(mediabay_create_kthread, sc);
 



Home | Main Index | Thread Index | Old Index