Lines Matching defs:ahc
56 static int aic7770_chip_init(struct ahc_softc *ahc);
57 static int aha2840_load_seeprom(struct ahc_softc *ahc);
119 aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
127 error = entry->setup(ahc);
132 error = aic7770_map_registers(ahc, io);
142 ahc_intr_enable(ahc, FALSE);
144 ahc->description = entry->name;
145 error = ahc_softc_init(ahc);
149 ahc->bus_chip_init = aic7770_chip_init;
151 error = ahc_reset(ahc, /*reinit*/FALSE);
156 intdef = ahc_inb(ahc, INTDEF);
172 ahc->flags |= AHC_EDGE_INTERRUPT;
174 switch (ahc->chip & (AHC_EISA|AHC_VL)) {
181 biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
182 scsiconf = ahc_inb(ahc, SCSICONF);
183 scsiconf1 = ahc_inb(ahc, SCSICONF + 1);
187 ahc->flags |= 1;
190 ahc->flags |= AHC_USEDEFAULTS;
192 if ((ahc->features & AHC_WIDE) != 0) {
193 ahc->our_id = scsiconf1 & HWSCSIID;
195 ahc->flags |= AHC_TERM_ENB_A;
197 ahc->our_id = scsiconf & HSCSIID;
198 ahc->our_id_b = scsiconf1 & HSCSIID;
200 ahc->flags |= AHC_TERM_ENB_A;
202 ahc->flags |= AHC_TERM_ENB_B;
205 if ((ahc_inb(ahc, HA_274_BIOSGLOBAL) & HA_274_EXTENDED_TRANS))
206 ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B;
211 have_seeprom = aha2840_load_seeprom(ahc);
218 kfree(ahc->seep_config);
219 ahc->seep_config = NULL;
225 ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
228 hostconf = ahc_inb(ahc, HOSTCONF);
229 ahc_outb(ahc, BUSSPD, hostconf & DFTHRSH);
230 ahc_outb(ahc, BUSTIME, (hostconf << 2) & BOFF);
232 ahc->bus_softc.aic7770_softc.busspd = hostconf & DFTHRSH;
233 ahc->bus_softc.aic7770_softc.bustime = (hostconf << 2) & BOFF;
238 error = ahc_init(ahc);
242 error = aic7770_map_int(ahc, irq);
246 ahc->init_level++;
251 ahc_outb(ahc, BCTL, ENABLE);
256 aic7770_chip_init(struct ahc_softc *ahc)
258 ahc_outb(ahc, BUSSPD, ahc->bus_softc.aic7770_softc.busspd);
259 ahc_outb(ahc, BUSTIME, ahc->bus_softc.aic7770_softc.bustime);
260 ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
261 ahc_outb(ahc, BCTL, ENABLE);
262 return (ahc_chip_init(ahc));
269 aha2840_load_seeprom(struct ahc_softc *ahc)
276 sd.sd_ahc = ahc;
287 sc = ahc->seep_config;
290 printk("%s: Reading SEEPROM...", ahc_name(ahc));
307 printk("%s: No SEEPROM available\n", ahc_name(ahc));
308 ahc->flags |= AHC_USEDEFAULTS;
318 max_targ = (ahc->features & AHC_WIDE) != 0 ? 16 : 8;
330 ahc_outb(ahc, TARG_SCSIRATE + i, target_settings);
332 ahc_outb(ahc, DISC_DSB, ~(discenable & 0xff));
333 ahc_outb(ahc, DISC_DSB + 1, ~((discenable >> 8) & 0xff));
335 ahc->our_id = sc->brtime_id & CFSCSIID;
337 scsi_conf = (ahc->our_id & 0x7);
344 ahc->flags |= AHC_EXTENDED_TRANS_A;
346 ahc_outb(ahc, SCSICONF, scsi_conf);
349 ahc->flags |= AHC_TERM_ENB_A;
355 ahc_aic7770_VL_setup(struct ahc_softc *ahc)
359 error = ahc_aic7770_setup(ahc);
360 ahc->chip |= AHC_VL;
365 ahc_aic7770_EISA_setup(struct ahc_softc *ahc)
369 error = ahc_aic7770_setup(ahc);
370 ahc->chip |= AHC_EISA;
375 ahc_aic7770_setup(struct ahc_softc *ahc)
377 ahc->channel = 'A';
378 ahc->channel_b = 'B';
379 ahc->chip = AHC_AIC7770;
380 ahc->features = AHC_AIC7770_FE;
381 ahc->bugs |= AHC_TMODE_WIDEODD_BUG;
382 ahc->flags |= AHC_PAGESCBS;
383 ahc->instruction_ram_size = 448;