Date: Tue, 17 Jul 2012 03:18:13 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238545 - in head/sys/arm: arm at91 econa s3c2xx0 xscale/i8134x xscale/pxa Message-ID: <201207170318.q6H3IDx7010821@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Tue Jul 17 03:18:12 2012 New Revision: 238545 URL: http://svn.freebsd.org/changeset/base/238545 Log: Move unmask IRQ function call up to nexus device level. FDT-enabled targets were broken after r238043 that relies on device up the hierarchy to properly setup interrupt. nexus device for ARM platforms did job only partially: setting handler but not unmasking interrupt. Unmasking was performed by platform code. Reviewed by: andrew@ Modified: head/sys/arm/arm/nexus.c head/sys/arm/at91/at91.c head/sys/arm/econa/econa.c head/sys/arm/s3c2xx0/s3c24x0.c head/sys/arm/xscale/i8134x/i81342.c head/sys/arm/xscale/pxa/pxa_obio.c Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Tue Jul 17 03:02:11 2012 (r238544) +++ head/sys/arm/arm/nexus.c Tue Jul 17 03:18:12 2012 (r238545) @@ -117,12 +117,16 @@ static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { + int irq; if ((rman_get_flags(res) & RF_SHAREABLE) == 0) flags |= INTR_EXCL; - arm_setup_irqhandler(device_get_nameunit(child), - filt, intr, arg, rman_get_start(res), flags, cookiep); + for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) { + arm_setup_irqhandler(device_get_nameunit(child), + filt, intr, arg, irq, flags, cookiep); + arm_unmask_irq(irq); + } return (0); } Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Tue Jul 17 03:02:11 2012 (r238544) +++ head/sys/arm/at91/at91.c Tue Jul 17 03:18:12 2012 (r238545) @@ -397,7 +397,6 @@ at91_setup_intr(device_t dev, device_t c struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { - struct at91_softc *sc = device_get_softc(dev); int error; if (rman_get_start(ires) == AT91_IRQ_SYSTEM && filt == NULL) @@ -407,8 +406,6 @@ at91_setup_intr(device_t dev, device_t c if (error) return (error); - bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IECR, - 1 << rman_get_start(ires)); return (0); } Modified: head/sys/arm/econa/econa.c ============================================================================== --- head/sys/arm/econa/econa.c Tue Jul 17 03:02:11 2012 (r238544) +++ head/sys/arm/econa/econa.c Tue Jul 17 03:18:12 2012 (r238545) @@ -602,8 +602,6 @@ econa_setup_intr(device_t dev, device_t if (error) return (error); - arm_unmask_irq(rman_get_start(ires)); - return (0); } Modified: head/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0.c Tue Jul 17 03:02:11 2012 (r238544) +++ head/sys/arm/s3c2xx0/s3c24x0.c Tue Jul 17 03:18:12 2012 (r238545) @@ -220,7 +220,6 @@ s3c24x0_setup_intr(device_t dev, device_ /* Enable the external interrupt pin */ s3c24x0_enable_ext_intr(irq - S3C24X0_EXTIRQ_MIN); } - arm_unmask_irq(irq); } return (0); } Modified: head/sys/arm/xscale/i8134x/i81342.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342.c Tue Jul 17 03:02:11 2012 (r238544) +++ head/sys/arm/xscale/i8134x/i81342.c Tue Jul 17 03:18:12 2012 (r238545) @@ -435,7 +435,6 @@ i81342_setup_intr(device_t dev, device_t filt, intr, arg, cookiep); if (error) return (error); - arm_unmask_irq(rman_get_start(ires)); return (0); } Modified: head/sys/arm/xscale/pxa/pxa_obio.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_obio.c Tue Jul 17 03:02:11 2012 (r238544) +++ head/sys/arm/xscale/pxa/pxa_obio.c Tue Jul 17 03:18:12 2012 (r238545) @@ -181,7 +181,6 @@ pxa_setup_intr(device_t dev, device_t ch filter, ithread, arg, cookiep); if (error) return (error); - arm_unmask_irq(rman_get_start(irq)); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207170318.q6H3IDx7010821>