Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/powerpc Remove dependancy on ICU_LEN m.d. d...



details:   https://anonhg.NetBSD.org/src/rev/6475c97bfee3
branches:  trunk
changeset: 503283:6475c97bfee3
user:      briggs <briggs%NetBSD.org@localhost>
date:      Sun Feb 04 17:35:28 2001 +0000

description:
Remove dependancy on ICU_LEN m.d. define.  Thanks, Tsubai.

diffstat:

 sys/arch/powerpc/powerpc/openpic.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r d7a13b789b38 -r 6475c97bfee3 sys/arch/powerpc/powerpc/openpic.c
--- a/sys/arch/powerpc/powerpc/openpic.c        Sun Feb 04 17:34:11 2001 +0000
+++ b/sys/arch/powerpc/powerpc/openpic.c        Sun Feb 04 17:35:28 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openpic.c,v 1.1 2001/02/02 06:11:53 briggs Exp $       */
+/*     $NetBSD: openpic.c,v 1.2 2001/02/04 17:35:28 briggs Exp $       */
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -7,7 +7,7 @@
 volatile unsigned char *openpic_base;
 
 void
-openpic_init(unsigned char *base)
+openpic_init(unsigned char *base, int topirq)
 {
        int irq, maxirq;
        u_int x;
@@ -29,10 +29,10 @@
        openpic_write(OPENPIC_CONFIG, x);
 
        /* send all interrupts to cpu 0 */
-       for (irq = 0; irq < ICU_LEN; irq++)
+       for (irq = 0; irq < topirq; irq++)
                openpic_write(OPENPIC_IDEST(irq), 1 << 0);
 
-       for (irq = 0; irq < ICU_LEN; irq++) {
+       for (irq = 0; irq < topirq; irq++) {
                x = OPENPIC_INIT_SRC(irq);
                openpic_write(OPENPIC_SRC_VECTOR(irq), x);
        }
@@ -47,7 +47,7 @@
                openpic_eoi(0);
        }
 
-       for (irq = 0; irq < ICU_LEN; irq++)
+       for (irq = 0; irq < topirq; irq++)
                openpic_disable_irq(irq);
 }
 



Home | Main Index | Thread Index | Old Index