Lines Matching defs:ahc

62 static int aic7770_chip_init(struct ahc_softc *ahc);
63 static int aha2840_load_seeprom(struct ahc_softc *ahc);
125 aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
133 error = entry->setup(ahc);
138 error = aic7770_map_registers(ahc, io);
148 ahc_intr_enable(ahc, FALSE);
150 ahc->description = entry->name;
151 error = ahc_softc_init(ahc);
155 ahc->bus_chip_init = aic7770_chip_init;
157 error = ahc_reset(ahc, /*reinit*/FALSE);
162 intdef = ahc_inb(ahc, INTDEF);
178 ahc->flags |= AHC_EDGE_INTERRUPT;
180 switch (ahc->chip & (AHC_EISA|AHC_VL)) {
187 biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
188 scsiconf = ahc_inb(ahc, SCSICONF);
189 scsiconf1 = ahc_inb(ahc, SCSICONF + 1);
193 ahc->flags |= 1;
196 ahc->flags |= AHC_USEDEFAULTS;
198 if ((ahc->features & AHC_WIDE) != 0) {
199 ahc->our_id = scsiconf1 & HWSCSIID;
201 ahc->flags |= AHC_TERM_ENB_A;
203 ahc->our_id = scsiconf & HSCSIID;
204 ahc->our_id_b = scsiconf1 & HSCSIID;
206 ahc->flags |= AHC_TERM_ENB_A;
208 ahc->flags |= AHC_TERM_ENB_B;
211 if ((ahc_inb(ahc, HA_274_BIOSGLOBAL) & HA_274_EXTENDED_TRANS))
212 ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B;
217 have_seeprom = aha2840_load_seeprom(ahc);
224 kfree(ahc->seep_config);
225 ahc->seep_config = NULL;
231 ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
234 hostconf = ahc_inb(ahc, HOSTCONF);
235 ahc_outb(ahc, BUSSPD, hostconf & DFTHRSH);
236 ahc_outb(ahc, BUSTIME, (hostconf << 2) & BOFF);
238 ahc->bus_softc.aic7770_softc.busspd = hostconf & DFTHRSH;
239 ahc->bus_softc.aic7770_softc.bustime = (hostconf << 2) & BOFF;
244 error = ahc_init(ahc);
248 error = aic7770_map_int(ahc, irq);
252 ahc->init_level++;
257 ahc_outb(ahc, BCTL, ENABLE);
262 aic7770_chip_init(struct ahc_softc *ahc)
264 ahc_outb(ahc, BUSSPD, ahc->bus_softc.aic7770_softc.busspd);
265 ahc_outb(ahc, BUSTIME, ahc->bus_softc.aic7770_softc.bustime);
266 ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
267 ahc_outb(ahc, BCTL, ENABLE);
268 return (ahc_chip_init(ahc));
275 aha2840_load_seeprom(struct ahc_softc *ahc)
282 sd.sd_ahc = ahc;
293 sc = ahc->seep_config;
296 printk("%s: Reading SEEPROM...", ahc_name(ahc));
313 printk("%s: No SEEPROM available\n", ahc_name(ahc));
314 ahc->flags |= AHC_USEDEFAULTS;
324 max_targ = (ahc->features & AHC_WIDE) != 0 ? 16 : 8;
336 ahc_outb(ahc, TARG_SCSIRATE + i, target_settings);
338 ahc_outb(ahc, DISC_DSB, ~(discenable & 0xff));
339 ahc_outb(ahc, DISC_DSB + 1, ~((discenable >> 8) & 0xff));
341 ahc->our_id = sc->brtime_id & CFSCSIID;
343 scsi_conf = (ahc->our_id & 0x7);
350 ahc->flags |= AHC_EXTENDED_TRANS_A;
352 ahc_outb(ahc, SCSICONF, scsi_conf);
355 ahc->flags |= AHC_TERM_ENB_A;
361 ahc_aic7770_VL_setup(struct ahc_softc *ahc)
365 error = ahc_aic7770_setup(ahc);
366 ahc->chip |= AHC_VL;
371 ahc_aic7770_EISA_setup(struct ahc_softc *ahc)
375 error = ahc_aic7770_setup(ahc);
376 ahc->chip |= AHC_EISA;
381 ahc_aic7770_setup(struct ahc_softc *ahc)
383 ahc->channel = 'A';
384 ahc->channel_b = 'B';
385 ahc->chip = AHC_AIC7770;
386 ahc->features = AHC_AIC7770_FE;
387 ahc->bugs |= AHC_TMODE_WIDEODD_BUG;
388 ahc->flags |= AHC_PAGESCBS;
389 ahc->instruction_ram_size = 448;