From 8b7128e3985bd1f14fc74144ed81940bc94fb950 Mon Sep 17 00:00:00 2001 From: bjh21 Date: Sun, 19 Aug 2001 15:27:44 +0000 Subject: [PATCH] Changes in aid of FIQ support: Add ioc_fiq_setmask(). Change ioc_irq_status_full() to use the request registers rather than the status registers. This is brings it into line with the Unix baclplane, and makes detecting downgraded FIQs possible. --- sys/arch/arm26/iobus/ioc.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sys/arch/arm26/iobus/ioc.c b/sys/arch/arm26/iobus/ioc.c index 2bf30a32bb5a..0c09a9a2ecc3 100644 --- a/sys/arch/arm26/iobus/ioc.c +++ b/sys/arch/arm26/iobus/ioc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ioc.c,v 1.12 2001/06/19 13:42:12 wiz Exp $ */ +/* $NetBSD: ioc.c,v 1.13 2001/08/19 15:27:44 bjh21 Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 Ben Harris @@ -33,7 +33,7 @@ #include -__RCSID("$NetBSD: ioc.c,v 1.12 2001/06/19 13:42:12 wiz Exp $"); +__RCSID("$NetBSD: ioc.c,v 1.13 2001/08/19 15:27:44 bjh21 Exp $"); #include #include @@ -254,8 +254,8 @@ ioc_irq_status_full() bus_space_read_1(bst, bsh, IOC_IRQMSKA) | (bus_space_read_1(bst, bsh, IOC_IRQMSKB) << 8)); #endif - return bus_space_read_1(bst, bsh, IOC_IRQSTA) | - (bus_space_read_1(bst, bsh, IOC_IRQSTB) << 8); + return bus_space_read_1(bst, bsh, IOC_IRQRQA) | + (bus_space_read_1(bst, bsh, IOC_IRQRQB) << 8); } void @@ -314,6 +314,21 @@ int ioc_get_irq_level(struct device *self, int irq) #endif /* 0 */ +/* + * FIQs + */ + +void +ioc_fiq_setmask(u_int32_t mask) +{ + struct ioc_softc *sc = (void *)the_ioc; + bus_space_tag_t bst = sc->sc_bst; + bus_space_handle_t bsh = sc->sc_bsh; + + bus_space_write_1(bst, bsh, IOC_FIQMSK, mask); +} + + /* * Counters