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/macppc Pullup 1.15 [tsubai, mycroft]:



details:   https://anonhg.NetBSD.org/src/rev/a669186c02b2
branches:  netbsd-1-5
changeset: 490079:a669186c02b2
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Nov 01 16:26:07 2000 +0000

description:
Pullup 1.15 [tsubai, mycroft]:
Add "type" argument to openpic_enable_irq().

diffstat:

 sys/arch/macppc/macppc/extintr.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 774c3af5bafe -r a669186c02b2 sys/arch/macppc/macppc/extintr.c
--- a/sys/arch/macppc/macppc/extintr.c  Wed Nov 01 16:25:19 2000 +0000
+++ b/sys/arch/macppc/macppc/extintr.c  Wed Nov 01 16:26:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extintr.c,v 1.12 2000/02/14 12:45:52 tsubai Exp $      */
+/*     $NetBSD: extintr.c,v 1.12.4.1 2000/11/01 16:26:07 tv Exp $      */
 
 /*-
  * Copyright (c) 1995 Per Fogelstrom
@@ -69,7 +69,7 @@
 
 static __inline u_int openpic_read __P((int));
 static __inline void openpic_write __P((int, u_int));
-void openpic_enable_irq __P((int));
+void openpic_enable_irq __P((int, int));
 void openpic_disable_irq __P((int));
 void openpic_set_priority __P((int, int));
 static __inline int openpic_read_irq __P((int));
@@ -218,13 +218,17 @@
 }
 
 void
-openpic_enable_irq(irq)
-       int irq;
+openpic_enable_irq(irq, type)
+       int irq, type;
 {
        u_int x;
 
        x = openpic_read(OPENPIC_SRC_VECTOR(irq));
-       x &= ~OPENPIC_IMASK;
+       x &= ~(OPENPIC_IMASK | OPENPIC_SENSE_LEVEL | OPENPIC_SENSE_EDGE);
+       if (type == IST_LEVEL)
+               x |= OPENPIC_SENSE_LEVEL;
+       else
+               x |= OPENPIC_SENSE_EDGE;
        openpic_write(OPENPIC_SRC_VECTOR(irq), x);
 }
 
@@ -367,7 +371,7 @@
        if (have_openpic) {
                for (irq = 0; irq < NIRQ; irq++) {
                        if (irqs & (1 << irq))
-                               openpic_enable_irq(hwirq[irq]);
+                               openpic_enable_irq(hwirq[irq], intrtype[irq]);
                        else
                                openpic_disable_irq(hwirq[irq]);
                }
@@ -643,7 +647,7 @@
 
                intrcnt[hwirq[irq]]++;
                if (have_openpic)
-                       openpic_enable_irq(hwirq[irq]);
+                       openpic_enable_irq(hwirq[irq], intrtype[irq]);
        }
 
        /*out32rb(INT_ENABLE_REG, ~imen);*/



Home | Main Index | Thread Index | Old Index