si_pci.c (119419) | si_pci.c (127135) |
---|---|
1/*- 2 * Device driver for Specialix range (SI/XIO) of serial line multiplexors. 3 * 4 * Copyright (C) 2000, Peter Wemm <peter@netplex.com.au> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 5 unchanged lines hidden (view full) --- 14 * 15 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 * NO EVENT SHALL THE AUTHORS BE LIABLE. 19 */ 20 21#include <sys/cdefs.h> | 1/*- 2 * Device driver for Specialix range (SI/XIO) of serial line multiplexors. 3 * 4 * Copyright (C) 2000, Peter Wemm <peter@netplex.com.au> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 5 unchanged lines hidden (view full) --- 14 * 15 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 * NO EVENT SHALL THE AUTHORS BE LIABLE. 19 */ 20 21#include <sys/cdefs.h> |
22__FBSDID("$FreeBSD: head/sys/dev/si/si_pci.c 119419 2003-08-24 18:03:45Z obrien $"); | 22__FBSDID("$FreeBSD: head/sys/dev/si/si_pci.c 127135 2004-03-17 17:50:55Z njl $"); |
23 24#include <sys/param.h> 25#include <sys/systm.h> 26#include <sys/kernel.h> 27#include <sys/bus.h> 28#include <machine/bus.h> 29#include <sys/rman.h> 30#include <machine/resource.h> --- 41 unchanged lines hidden (view full) --- 72 sc->sc_mem_rid = SIPCIBADR; 73 break; 74 case 0x200011cb: 75 sc->sc_type = SIJETPCI; 76 sc->sc_mem_rid = SIJETBADR; 77 break; 78 } 79 | 23 24#include <sys/param.h> 25#include <sys/systm.h> 26#include <sys/kernel.h> 27#include <sys/bus.h> 28#include <machine/bus.h> 29#include <sys/rman.h> 30#include <machine/resource.h> --- 41 unchanged lines hidden (view full) --- 72 sc->sc_mem_rid = SIPCIBADR; 73 break; 74 case 0x200011cb: 75 sc->sc_type = SIJETPCI; 76 sc->sc_mem_rid = SIJETBADR; 77 break; 78 } 79 |
80 sc->sc_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, 81 &sc->sc_mem_rid, 82 0, ~0, 1, RF_ACTIVE); | 80 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, 81 &sc->sc_mem_rid, 82 RF_ACTIVE); |
83 if (!sc->sc_mem_res) { 84 device_printf(dev, "couldn't map memory\n"); 85 goto fail; 86 } 87 sc->sc_paddr = (caddr_t)rman_get_start(sc->sc_mem_res); 88 sc->sc_maddr = rman_get_virtual(sc->sc_mem_res); 89 90 sc->sc_irq_rid = 0; | 83 if (!sc->sc_mem_res) { 84 device_printf(dev, "couldn't map memory\n"); 85 goto fail; 86 } 87 sc->sc_paddr = (caddr_t)rman_get_start(sc->sc_mem_res); 88 sc->sc_maddr = rman_get_virtual(sc->sc_mem_res); 89 90 sc->sc_irq_rid = 0; |
91 sc->sc_irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_irq_rid, 92 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); | 91 sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, 92 &sc->sc_irq_rid, 93 RF_ACTIVE | RF_SHAREABLE); |
93 if (!sc->sc_irq_res) { 94 device_printf(dev, "couldn't map interrupt\n"); 95 goto fail; 96 } 97 sc->sc_irq = rman_get_start(sc->sc_irq_res); 98 error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_TTY, 99 si_intr, sc, &ih); 100 if (error) { --- 42 unchanged lines hidden --- | 94 if (!sc->sc_irq_res) { 95 device_printf(dev, "couldn't map interrupt\n"); 96 goto fail; 97 } 98 sc->sc_irq = rman_get_start(sc->sc_irq_res); 99 error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_TTY, 100 si_intr, sc, &ih); 101 if (error) { --- 42 unchanged lines hidden --- |