svn commit: r209489 - head/sys/powerpc/mpc85xx
Marcel Moolenaar
marcel at FreeBSD.org
Wed Jun 23 23:16:27 UTC 2010
Author: marcel
Date: Wed Jun 23 23:16:27 2010
New Revision: 209489
URL: http://svn.freebsd.org/changeset/base/209489
Log:
With openpic(4) using active-low as the default polarity, reconfigure
the internal interrupt sources as active-high. The internal interrupt
sources are disabled when programmed as active-low.
Note that the internal interrupts have no sense bit like the external
interrupts. We program them as edge-triggered to make sure we write a
0 value to a reserved register. It does not in any way say anything
about the sense of internal interrupt.
Modified:
head/sys/powerpc/mpc85xx/ocpbus.c
Modified: head/sys/powerpc/mpc85xx/ocpbus.c
==============================================================================
--- head/sys/powerpc/mpc85xx/ocpbus.c Wed Jun 23 23:07:57 2010 (r209488)
+++ head/sys/powerpc/mpc85xx/ocpbus.c Wed Jun 23 23:16:27 2010 (r209489)
@@ -277,8 +277,15 @@ ocpbus_attach(device_t dev)
ccsr_read4(OCP85XX_PORDEVSR),
ccsr_read4(OCP85XX_PORDEVSR2));
- for (i = INTR_VEC(OPIC_ID, 0); i < INTR_VEC(OPIC_ID, 4); i++)
- powerpc_config_intr(i, INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
+ /*
+ * Internal interrupt are always active-high. Since the sense cannot
+ * be specified, we program as edge-triggered to make sure we write
+ * a 0 value to the reserved bit in the OpenPIC compliant PIC. This
+ * is not to say anything about the sense of any of the internal
+ * interrupt sources.
+ */
+ for (i = PIC_IRQ_INT(0); i < PIC_IRQ_INT(32); i++)
+ powerpc_config_intr(i, INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH);
return (bus_generic_attach(dev));
}
More information about the svn-src-head
mailing list