According to the i8259 manual, EOI, R, and SL bits belong to OCW2 register
so rename them OCW3_* -> OCW2_*.
This commit is contained in:
parent
566420c2cf
commit
337a4c703f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcib.c,v 1.17 2005/12/11 12:16:08 christos Exp $ */
|
||||
/* $NetBSD: pcib.c,v 1.18 2006/05/12 10:58:12 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.17 2005/12/11 12:16:08 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.18 2006/05/12 10:58:12 tsutsui Exp $");
|
||||
|
||||
#include "opt_algor_p5064.h"
|
||||
#include "opt_algor_p6032.h"
|
||||
@ -393,13 +393,13 @@ pcib_intr(void *v)
|
||||
/* Send a specific EOI to the 8259. */
|
||||
if (irq > 7) {
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh_icu2,
|
||||
PIC_OCW2, OCW2_SELECT | OCW3_EOI | OCW3_SL |
|
||||
PIC_OCW2, OCW2_SELECT | OCW2_EOI | OCW2_SL |
|
||||
OCW2_ILS(irq & 7));
|
||||
irq = 2;
|
||||
}
|
||||
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh_icu1, PIC_OCW2,
|
||||
OCW2_SELECT | OCW3_EOI | OCW3_SL | OCW2_ILS(irq));
|
||||
OCW2_SELECT | OCW2_EOI | OCW2_SL | OCW2_ILS(irq));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcib.c,v 1.11 2005/12/11 12:17:11 christos Exp $ */
|
||||
/* $NetBSD: pcib.c,v 1.12 2006/05/12 10:58:12 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.11 2005/12/11 12:17:11 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.12 2006/05/12 10:58:12 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -417,13 +417,13 @@ pcib_intr(void *v)
|
||||
/* Send a specific EOI to the 8259. */
|
||||
if (irq > 7) {
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh_icu2,
|
||||
PIC_OCW2, OCW2_SELECT | OCW3_EOI | OCW3_SL |
|
||||
PIC_OCW2, OCW2_SELECT | OCW2_EOI | OCW2_SL |
|
||||
OCW2_ILS(irq & 7));
|
||||
irq = 2;
|
||||
}
|
||||
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh_icu1, PIC_OCW2,
|
||||
OCW2_SELECT | OCW3_EOI | OCW3_SL | OCW2_ILS(irq));
|
||||
OCW2_SELECT | OCW2_EOI | OCW2_SL | OCW2_ILS(irq));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i8259reg.h,v 1.2 2001/06/21 18:57:04 thorpej Exp $ */
|
||||
/* $NetBSD: i8259reg.h,v 1.3 2006/05/12 10:58:12 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -83,9 +83,9 @@
|
||||
|
||||
#define PIC_OCW2 0x00 /* Operational Control Word 2 (w) */
|
||||
#define OCW2_SELECT (0) /* select OCW2 */
|
||||
#define OCW3_EOI (1U << 5) /* EOI */
|
||||
#define OCW3_SL (1U << 6) /* specific */
|
||||
#define OCW3_R (1U << 7) /* rotate */
|
||||
#define OCW2_EOI (1U << 5) /* EOI */
|
||||
#define OCW2_SL (1U << 6) /* specific */
|
||||
#define OCW2_R (1U << 7) /* rotate */
|
||||
#define OCW2_ILS(x) ((x) << 0) /* interrupt level select */
|
||||
|
||||
#define PIC_OCW3 0x00 /* Operational Control Word 3 (r/w) */
|
||||
|
Loading…
Reference in New Issue
Block a user