1/* 2 * Product specific probe and attach routines for: 3 * Buslogic BT-54X and BT-445 cards 4 * 5 * Copyright (c) 1998 Justin T. Gibbs 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $Id: bt_isa.c,v 1.4 1998/10/12 18:53:33 imp Exp $ |
30 */ 31 32#include <sys/param.h> 33#include <sys/systm.h> 34 35#include <machine/bus_pio.h> 36#include <machine/bus.h> 37 --- 43 unchanged lines hidden (view full) --- 81 82 bt = NULL; 83 port_index = 0; 84 max_port_index = BT_NUM_ISAPORTS - 1; 85 /* 86 * Bound our board search if the user has 87 * specified an exact port. 88 */ |
89 bt_find_probe_range(dev->id_iobase, &port_index, &max_port_index); |
90 |
91 if (port_index < 0) 92 return 0; 93 |
94 /* Attempt to find an adapter */ 95 for (;port_index <= max_port_index; port_index++) { 96 config_data_t config_data; 97 u_int ioport; 98 int error; 99 |
100 ioport = bt_iop_from_bio(port_index); |
101 102 /* 103 * Ensure this port has not already been claimed already 104 * by a PCI, EISA or ISA adapter. 105 */ 106 if (bt_check_probed_iop(ioport) != 0) 107 continue; |
108 dev->id_iobase = ioport; |
109 if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET)) 110 continue; 111 112 /* Allocate a softc for use during probing */ 113 bt = bt_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport); 114 115 if (bt == NULL) 116 break; --- 33 unchanged lines hidden (view full) --- 150 break; 151 case DMA_CHAN_7: 152 dev->id_drq = 7; 153 break; 154 default: 155 printf("bt_isa_probe: Invalid DMA setting " 156 "detected for adapter at 0x%x. " 157 "Failing probe\n", ioport); |
158 return (0); |
159 } 160 } else { 161 /* VL DMA */ 162 dev->id_drq = -1; 163 } 164 dev->id_irq = (config_data.irq << 9); 165 dev->id_intr = bt_isa_intr; 166 --- 145 unchanged lines hidden --- |