Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 2009 07:31:47 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 157830 for review
Message-ID:  <200902170731.n1H7Vlox000365@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=157830

Change 157830 by andrew@andrew_bender on 2009/02/17 07:31:44

	Pass INTCTL_INTPND back into itself to clear the appropriate bit.
	Make sure the parent IRQ is masked as it can cause issues with UART if not.

Affected files ...

.. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0.c#5 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0.c#5 (text+ko) ====

@@ -501,6 +501,7 @@
 int
 arm_get_next_irq(void)
 {
+	uint32_t intpnd;
 	int irq;
 
 	if ((irq = bus_space_read_4(&s3c2xx0_bs_tag,
@@ -509,8 +510,10 @@
 		/* Clear the pending bit */
 		bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh,
 		    INTCTL_SRCPND, (1 << irq));
+		intpnd = bus_space_read_4(&s3c2xx0_bs_tag,
+		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTPND);
 		bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh,
-		    INTCTL_INTPND, (1 << irq));
+		    INTCTL_INTPND, intpnd);
 
 		switch (irq) {
 		case S3C24X0_INT_ADCTC:
@@ -600,6 +603,8 @@
 			/* We don't know which other IRQ to unmask */
 			return;
 		}
+		arm_mask_irq(irq);
+		return;
 	}
 	mask = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh,
 	    INTCTL_INTMSK);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902170731.n1H7Vlox000365>