summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91/at91.c
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2008-04-20 23:29:06 +0000
committercognet <cognet@FreeBSD.org>2008-04-20 23:29:06 +0000
commit19c46f4f03d6363bbbe6543e3f4c0fe81f6f3da5 (patch)
treea7483fc0d443624328312a9aa05b50fff4886c2d /sys/arm/at91/at91.c
parent0249d0d19634037595dbe5b78038a214689c0f96 (diff)
downloadFreeBSD-src-19c46f4f03d6363bbbe6543e3f4c0fe81f6f3da5.zip
FreeBSD-src-19c46f4f03d6363bbbe6543e3f4c0fe81f6f3da5.tar.gz
On the AT91, we need to write on the EOI register after we handle an
interrupt. So, add a new function pointer, arm_post_filter, which defaults to NULL, and which will be used as the post_filter arg for intr_event_create(). Set it properly for the AT91, so that it boots again. Reported by: hps
Diffstat (limited to 'sys/arm/at91/at91.c')
-rw-r--r--sys/arm/at91/at91.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c
index 00d5c91..246f73a 100644
--- a/sys/arm/at91/at91.c
+++ b/sys/arm/at91/at91.c
@@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$");
static struct at91_softc *at91_softc;
+static void at91_eoi(void *);
+
static int
at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
bus_space_handle_t *bshp)
@@ -172,6 +174,7 @@ static int
at91_probe(device_t dev)
{
device_set_desc(dev, "AT91 device bus");
+ arm_post_filter = at91_eoi;
return (0);
}
@@ -689,6 +692,13 @@ arm_unmask_irq(uintptr_t nb)
}
+static void
+at91_eoi(void *unused)
+{
+ bus_space_write_4(at91_softc->sc_st, at91_softc->sc_sys_sh,
+ IC_EOICR, 0);
+}
+
static device_method_t at91_methods[] = {
DEVMETHOD(device_probe, at91_probe),
DEVMETHOD(device_attach, at91_attach),
OpenPOWER on IntegriCloud