Date: Wed, 23 Jun 2010 23:16:27 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209489 - head/sys/powerpc/mpc85xx Message-ID: <201006232316.o5NNGRNx009612@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006232316.o5NNGRNx009612>