summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2003-02-20 01:59:42 +0000
committergrehan <grehan@FreeBSD.org>2003-02-20 01:59:42 +0000
commiteeab6579735293780ab11332990cfd7c898d7b84 (patch)
tree10201252104b34895abd84ec74949dcf0a5ad76e /sys
parent24a98368c57699a34d3b0d1d766d12e10a185509 (diff)
downloadFreeBSD-src-eeab6579735293780ab11332990cfd7c898d7b84.zip
FreeBSD-src-eeab6579735293780ab11332990cfd7c898d7b84.tar.gz
Adjust IRQ count for psim's OpenPIC model - it seems to be
off by 1.
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/powerpc/openpic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/powerpc/powerpc/openpic.c b/sys/powerpc/powerpc/openpic.c
index 50dab9f..27a8cb8 100644
--- a/sys/powerpc/powerpc/openpic.c
+++ b/sys/powerpc/powerpc/openpic.c
@@ -187,6 +187,12 @@ openpic_probe(device_t dev)
sc->sc_nirq = ((val & OPENPIC_FEATURE_LAST_IRQ_MASK) >>
OPENPIC_FEATURE_LAST_IRQ_SHIFT) + 1;
+ /*
+ * PSIM seems to report 1 too many IRQs
+ */
+ if (sc->sc_psim)
+ sc->sc_nirq--;
+
device_set_desc(dev, "OpenPIC interrupt controller");
return (0);
}
OpenPOWER on IntegriCloud