This commit is contained in:
purplerain 2023-06-19 18:06:04 +00:00
parent 6871d7cb85
commit 451579e149
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
103 changed files with 365 additions and 470 deletions

View file

@ -72,11 +72,11 @@ ahc_eisa_irq(bus_space_tag_t iot, bus_space_handle_t ioh)
int irq;
u_char intdef;
u_char hcntrl;
/* Pause the card preserving the IRQ type */
hcntrl = bus_space_read_1(iot, ioh, HCNTRL) & IRQMS;
bus_space_write_1(iot, ioh, HCNTRL, hcntrl | PAUSE);
intdef = bus_space_read_1(iot, ioh, INTDEF);
switch (irq = (intdef & VECTOR)) {
case 9:
@ -145,10 +145,10 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
u_int scsiconf1;
u_int intdef;
int i;
ahc_set_name(ahc, ahc->sc_dev.dv_xname);
ahc_set_unit(ahc, ahc->sc_dev.dv_unit);
/* set dma tags */
ahc->parent_dmat = ea->ea_dmat;
@ -167,7 +167,7 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
ea->ea_idstring);
}
printf(": %s\n", model);
/*
* Instead of ahc_alloc() as in FreeBSD, do the few relevant
* initializations manually.
@ -194,15 +194,15 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
if (ahc_softc_init(ahc) != 0)
return;
if (ahc_reset(ahc, /*reinit*/FALSE) != 0)
return;
/* See if we are edge triggered */
intdef = ahc_inb(ahc, INTDEF);
if ((intdef & EDGE_TRIG) != 0)
ahc->flags |= AHC_EDGE_INTERRUPT;
if (eisa_intr_map(ec, irq, &ih)) {
printf("%s: couldn't map interrupt (%d)\n",
ahc->sc_dev.dv_xname, irq);
@ -221,7 +221,7 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
}
/*
* Now that we know we own the resources we need, do the
* Now that we know we own the resources we need, do the
* card initialization.
*
* First, the aic7770 card specific setup.
@ -229,7 +229,7 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
scsiconf = ahc_inb(ahc, SCSICONF);
scsiconf1 = ahc_inb(ahc, SCSICONF + 1);
/* Get the primary channel information */
if ((biosctrl & CHANNEL_B_PRIMARY) != 0)
ahc->flags |= AHC_PRIMARY_CHANNEL;
@ -252,10 +252,10 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
* We have no way to tell, so assume extended
* translation is enabled.
*/
ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B;
/*
/*
* See if we have a Rev E or higher aic7770. Anything below a
* Rev E will have a R/O autoflush disable configuration bit.
* It's still not clear exactly what is different about the Rev E.
@ -303,12 +303,12 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
ahc_free(ahc);
return;
}
/*
* Link this softc in with all other ahc instances.
*/
ahc_softc_insert(ahc);
/*
* Enable the board's BUS drivers
*/
@ -334,7 +334,7 @@ ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
if (intrstr != NULL)
printf("%s: interrupting at %s\n", ahc->sc_dev.dv_xname,
intrstr);
ahc_intr_enable(ahc, TRUE);
/* Attach sub-devices - always succeeds */

View file

@ -143,12 +143,12 @@ cac_eisa_attach(struct device *parent, struct device *self, void *aux)
bus_space_tag_t iot;
const char *intrstr;
int irq, i;
ea = aux;
sc = (struct cac_softc *)self;
iot = ea->ea_iot;
ec = ea->ea_ec;
if (bus_space_map(iot, EISA_SLOT_ADDR(ea->ea_slot) +
CAC_EISA_SLOT_OFFSET, CAC_EISA_IOSIZE, 0, &ioh)) {
printf(": can't map i/o space\n");
@ -171,7 +171,7 @@ cac_eisa_attach(struct device *parent, struct device *self, void *aux)
sc->sc_ioh = ioh;
sc->sc_dmat = ea->ea_dmat;
/*
/*
* Map and establish the interrupt.
*/
switch (bus_space_read_1(iot, ioh, CAC_EISA_IOCONF) & 0xf0) {
@ -196,7 +196,7 @@ cac_eisa_attach(struct device *parent, struct device *self, void *aux)
printf(": can't map interrupt (%d)\n", irq);
return;
}
intrstr = eisa_intr_string(ec, ih);
if ((sc->sc_ih = eisa_intr_establish(ec, ih, IST_LEVEL, IPL_BIO,
cac_intr, sc, sc->sc_dv.dv_xname)) == NULL) {

View file

@ -82,7 +82,7 @@ int
eisaprint(void *aux, const char *pnp)
{
register struct eisa_attach_args *ea = aux;
char devinfo[256];
char devinfo[256];
if (pnp) {
eisa_devinfo(ea->ea_idstring, devinfo, sizeof devinfo);

View file

@ -236,7 +236,7 @@ product ASU 4701 Mini 486AS Main Board
product ASU 4901 VL/EISA-486SV1 Main Board
product ASU 5101 PCI/E-P5MP4 or PCI/E-P54NP4 Main Board V2.3
product ASU 5201 P/E-P55T2P4D Main Board (CFG File V1.2)
/* ATI products */
product ATI 1500 AT-1500 Ethernet
product ATI 1700 AT-1700 Ethernet

View file

@ -46,7 +46,7 @@
#include <machine/bus.h>
#include <dev/eisa/eisareg.h> /* For ID register & string info. */
/*
/*
* Structures and definitions needed by the machine-dependent header.
*/
struct eisabus_attach_args;