ixp425.c (164508) | ixp425.c (166064) |
---|---|
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: head/sys/arm/xscale/ixp425/ixp425.c 164508 2006-11-22 12:57:17Z kevlo $"); | 37__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425.c 166064 2007-01-17 00:58:25Z cognet $"); |
38 39#define _ARM32_BUS_DMA_PRIVATE 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/bus.h> 43#include <sys/kernel.h> 44#include <sys/module.h> 45#include <sys/malloc.h> --- 98 unchanged lines hidden (view full) --- 144 ixp425_irq2gpio_bit(nb); 145 146 147} 148 149void 150arm_unmask_irq(uintptr_t nb) 151{ | 38 39#define _ARM32_BUS_DMA_PRIVATE 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/bus.h> 43#include <sys/kernel.h> 44#include <sys/module.h> 45#include <sys/malloc.h> --- 98 unchanged lines hidden (view full) --- 144 ixp425_irq2gpio_bit(nb); 145 146 147} 148 149void 150arm_unmask_irq(uintptr_t nb) 151{ |
152 |
|
152 intr_enabled |= (1 << nb); 153 ixp425_set_intrmask(); 154} 155 156static __inline uint32_t 157ixp425_irq_read(void) 158{ 159 return IXPREG(IXP425_INT_STATUS) & intr_enabled; --- 46 unchanged lines hidden (view full) --- 206 sc->sc_iot = &ixp425_bs_tag; 207 KASSERT(ixp425_softc == NULL, ("ixp425_attach called twice?")); 208 ixp425_softc = sc; 209 210 intr_enabled = 0; 211 ixp425_set_intrmask(); 212 ixp425_set_intrsteer(); 213 | 153 intr_enabled |= (1 << nb); 154 ixp425_set_intrmask(); 155} 156 157static __inline uint32_t 158ixp425_irq_read(void) 159{ 160 return IXPREG(IXP425_INT_STATUS) & intr_enabled; --- 46 unchanged lines hidden (view full) --- 207 sc->sc_iot = &ixp425_bs_tag; 208 KASSERT(ixp425_softc == NULL, ("ixp425_attach called twice?")); 209 ixp425_softc = sc; 210 211 intr_enabled = 0; 212 ixp425_set_intrmask(); 213 ixp425_set_intrsteer(); 214 |
215 if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, 216 BUS_SPACE_MAXADDR, NULL, NULL, 0xffffffff, 0xff, 0xffffffff, 0, 217 NULL, NULL, &sc->sc_dmat)) 218 panic("couldn't create the IXP425 dma tag !"); 219 |
|
214 sc->sc_irq_rman.rm_type = RMAN_ARRAY; 215 sc->sc_irq_rman.rm_descr = "IXP425 IRQs"; 216 if (rman_init(&sc->sc_irq_rman) != 0 || 217 rman_manage_region(&sc->sc_irq_rman, 0, 31) != 0) 218 panic("ixp425_attach: failed to set up IRQ rman"); 219 220 sc->sc_mem_rman.rm_type = RMAN_ARRAY; 221 sc->sc_mem_rman.rm_descr = "IXP425 Memory"; --- 149 unchanged lines hidden --- | 220 sc->sc_irq_rman.rm_type = RMAN_ARRAY; 221 sc->sc_irq_rman.rm_descr = "IXP425 IRQs"; 222 if (rman_init(&sc->sc_irq_rman) != 0 || 223 rman_manage_region(&sc->sc_irq_rman, 0, 31) != 0) 224 panic("ixp425_attach: failed to set up IRQ rman"); 225 226 sc->sc_mem_rman.rm_type = RMAN_ARRAY; 227 sc->sc_mem_rman.rm_descr = "IXP425 Memory"; --- 149 unchanged lines hidden --- |