ixp425.c (256281) | ixp425.c (278613) |
---|---|
1/* $NetBSD: ixp425.c,v 1.10 2005/12/11 12:16:51 christos Exp $ */ 2 3/* 4 * Copyright (c) 2003 5 * Ichiro FUKUHARA <ichiro@ichiro.org>. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> | 1/* $NetBSD: ixp425.c,v 1.10 2005/12/11 12:16:51 christos Exp $ */ 2 3/* 4 * Copyright (c) 2003 5 * Ichiro FUKUHARA <ichiro@ichiro.org>. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: stable/10/sys/arm/xscale/ixp425/ixp425.c 236987 2012-06-13 04:38:09Z imp $"); | 37__FBSDID("$FreeBSD: stable/10/sys/arm/xscale/ixp425/ixp425.c 278613 2015-02-12 03:50:33Z ian $"); |
38 39#include "opt_ddb.h" 40 41#define _ARM32_BUS_DMA_PRIVATE 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/bus.h> 45#include <sys/kernel.h> 46#include <sys/module.h> 47#include <sys/malloc.h> 48#include <sys/rman.h> | 38 39#include "opt_ddb.h" 40 41#define _ARM32_BUS_DMA_PRIVATE 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/bus.h> 45#include <sys/kernel.h> 46#include <sys/module.h> 47#include <sys/malloc.h> 48#include <sys/rman.h> |
49#include <machine/armreg.h> |
|
49#include <machine/bus.h> 50#include <machine/intr.h> 51 52#include <vm/vm.h> 53#include <vm/pmap.h> 54#include <arm/xscale/ixp425/ixp425reg.h> 55#include <arm/xscale/ixp425/ixp425var.h> 56#include <arm/xscale/ixp425/ixp425_intr.h> --- 140 unchanged lines hidden (view full) --- 197 ixp425_gpio_ack(irq); 198} 199 200void 201arm_mask_irq(uintptr_t nb) 202{ 203 int i; 204 | 50#include <machine/bus.h> 51#include <machine/intr.h> 52 53#include <vm/vm.h> 54#include <vm/pmap.h> 55#include <arm/xscale/ixp425/ixp425reg.h> 56#include <arm/xscale/ixp425/ixp425var.h> 57#include <arm/xscale/ixp425/ixp425_intr.h> --- 140 unchanged lines hidden (view full) --- 198 ixp425_gpio_ack(irq); 199} 200 201void 202arm_mask_irq(uintptr_t nb) 203{ 204 int i; 205 |
205 i = disable_interrupts(I32_bit); | 206 i = disable_interrupts(PSR_I); |
206 if (nb < 32) { 207 intr_enabled &= ~(1 << nb); 208 ixp425_set_intrmask(); 209 } else { 210 intr_enabled2 &= ~(1 << (nb - 32)); 211 ixp435_set_intrmask(); 212 } 213 restore_interrupts(i); 214 /*XXX; If it's a GPIO interrupt, ACK it know. Can it be a problem ?*/ 215 ixp425_gpio_ack(nb); 216} 217 218void 219arm_unmask_irq(uintptr_t nb) 220{ 221 int i; 222 | 207 if (nb < 32) { 208 intr_enabled &= ~(1 << nb); 209 ixp425_set_intrmask(); 210 } else { 211 intr_enabled2 &= ~(1 << (nb - 32)); 212 ixp435_set_intrmask(); 213 } 214 restore_interrupts(i); 215 /*XXX; If it's a GPIO interrupt, ACK it know. Can it be a problem ?*/ 216 ixp425_gpio_ack(nb); 217} 218 219void 220arm_unmask_irq(uintptr_t nb) 221{ 222 int i; 223 |
223 i = disable_interrupts(I32_bit); | 224 i = disable_interrupts(PSR_I); |
224 if (nb < 32) { 225 intr_enabled |= (1 << nb); 226 ixp425_set_intrmask(); 227 } else { 228 intr_enabled2 |= (1 << (nb - 32)); 229 ixp435_set_intrmask(); 230 } 231 restore_interrupts(i); --- 464 unchanged lines hidden --- | 225 if (nb < 32) { 226 intr_enabled |= (1 << nb); 227 ixp425_set_intrmask(); 228 } else { 229 intr_enabled2 |= (1 << (nb - 32)); 230 ixp435_set_intrmask(); 231 } 232 restore_interrupts(i); --- 464 unchanged lines hidden --- |