Changes so that these compile on NetBSD/alpha as well as NetBSD/i386.
This commit is contained in:
parent
7a1e3fe2ea
commit
18319c0048
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: aic6360.c,v 1.56 1998/01/13 03:31:42 enami Exp $ */
|
||||
/* $NetBSD: aic6360.c,v 1.57 1998/05/23 18:32:29 matt Exp $ */
|
||||
|
||||
#ifdef DDB
|
||||
#define integrate
|
||||
|
@ -1420,11 +1420,11 @@ aic_dataout_pio(sc, p, n)
|
|||
out += DOUTAMOUNT;
|
||||
|
||||
#if AIC_USE_DWORDS
|
||||
bus_space_write_multi_4(iot, ioh, DMADATALONG, p,
|
||||
DOUTAMOUNT >> 2);
|
||||
bus_space_write_multi_4(iot, ioh, DMADATALONG,
|
||||
(u_int32_t *) p, DOUTAMOUNT >> 2);
|
||||
#else
|
||||
bus_space_write_multi_2(iot, ioh, DMADATA, p,
|
||||
DOUTAMOUNT >> 1);
|
||||
bus_space_write_multi_2(iot, ioh, DMADATA,
|
||||
(u_int16_t *) p, DOUTAMOUNT >> 1);
|
||||
#endif
|
||||
|
||||
p += DOUTAMOUNT;
|
||||
|
@ -1440,14 +1440,14 @@ aic_dataout_pio(sc, p, n)
|
|||
#if AIC_USE_DWORDS
|
||||
if (xfer >= 12) {
|
||||
bus_space_write_multi_4(iot, ioh, DMADATALONG,
|
||||
p, xfer >> 2);
|
||||
(u_int32_t *) p, xfer >> 2);
|
||||
p += xfer & ~3;
|
||||
xfer &= 3;
|
||||
}
|
||||
#else
|
||||
if (xfer >= 8) {
|
||||
bus_space_write_multi_2(iot, ioh, DMADATA,
|
||||
p, xfer >> 1);
|
||||
(u_int16_t *) p, xfer >> 1);
|
||||
p += xfer & ~1;
|
||||
xfer &= 1;
|
||||
}
|
||||
|
@ -1564,11 +1564,11 @@ aic_datain_pio(sc, p, n)
|
|||
in += DINAMOUNT;
|
||||
|
||||
#if AIC_USE_DWORDS
|
||||
bus_space_read_multi_4(iot, ioh, DMADATALONG, p,
|
||||
DINAMOUNT >> 2);
|
||||
bus_space_read_multi_4(iot, ioh, DMADATALONG,
|
||||
(u_int32_t *) p, DINAMOUNT >> 2);
|
||||
#else
|
||||
bus_space_read_multi_2(iot, ioh, DMADATA, p,
|
||||
DINAMOUNT >> 1);
|
||||
bus_space_read_multi_2(iot, ioh, DMADATA,
|
||||
(u_int16_t *) p, DINAMOUNT >> 1);
|
||||
#endif
|
||||
|
||||
p += DINAMOUNT;
|
||||
|
@ -1584,14 +1584,14 @@ aic_datain_pio(sc, p, n)
|
|||
#if AIC_USE_DWORDS
|
||||
if (xfer >= 12) {
|
||||
bus_space_read_multi_4(iot, ioh, DMADATALONG,
|
||||
p, xfer >> 2);
|
||||
(u_int32_t *) p, xfer >> 2);
|
||||
p += xfer & ~3;
|
||||
xfer &= 3;
|
||||
}
|
||||
#else
|
||||
if (xfer >= 8) {
|
||||
bus_space_read_multi_2(iot, ioh, DMADATA, p,
|
||||
xfer >> 1);
|
||||
bus_space_read_multi_2(iot, ioh, DMADATA,
|
||||
(u_int16_t *) p, xfer >> 1);
|
||||
p += xfer & ~1;
|
||||
xfer &= 1;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: i82365var.h,v 1.3 1998/02/01 23:33:51 marc Exp $ */
|
||||
/* $NetBSD: i82365var.h,v 1.4 1998/05/23 18:32:29 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
|
||||
|
@ -85,7 +85,7 @@ struct pcic_softc {
|
|||
bus_space_handle_t ioh;
|
||||
|
||||
/* XXX isa_chipset_tag_t, pci_chipset_tag_t, etc. */
|
||||
caddr_t intr_est;
|
||||
void *intr_est;
|
||||
|
||||
pcmcia_chipset_tag_t pct;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: i82365_isa.c,v 1.8 1997/11/30 15:31:24 drochner Exp $ */
|
||||
/* $NetBSD: i82365_isa.c,v 1.9 1998/05/23 18:32:30 matt Exp $ */
|
||||
|
||||
#define PCICISADEBUG
|
||||
|
||||
|
@ -379,6 +379,7 @@ pcic_isa_chip_intr_establish(pch, pf, ipl, fct, arg)
|
|||
void *arg;
|
||||
{
|
||||
struct pcic_handle *h = (struct pcic_handle *) pch;
|
||||
isa_chipset_tag_t ic = h->sc->intr_est;
|
||||
int irq, ist;
|
||||
void *ih;
|
||||
int reg;
|
||||
|
@ -390,10 +391,10 @@ pcic_isa_chip_intr_establish(pch, pf, ipl, fct, arg)
|
|||
else
|
||||
ist = IST_LEVEL;
|
||||
|
||||
if (isa_intr_alloc(h->sc->intr_est,
|
||||
if (isa_intr_alloc(ic,
|
||||
PCIC_INTR_IRQ_VALIDMASK & pcic_isa_intr_alloc_mask, ist, &irq))
|
||||
return (NULL);
|
||||
if ((ih = isa_intr_establish(h->sc->intr_est, irq, ist, ipl,
|
||||
if ((ih = isa_intr_establish(ic, irq, ist, ipl,
|
||||
fct, arg)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
|
@ -415,6 +416,7 @@ pcic_isa_chip_intr_disestablish(pch, ih)
|
|||
void *ih;
|
||||
{
|
||||
struct pcic_handle *h = (struct pcic_handle *) pch;
|
||||
isa_chipset_tag_t ic = h->sc->intr_est;
|
||||
int reg;
|
||||
|
||||
h->ih_irq = 0;
|
||||
|
@ -423,5 +425,5 @@ pcic_isa_chip_intr_disestablish(pch, ih)
|
|||
reg &= ~(PCIC_INTR_IRQ_MASK | PCIC_INTR_ENABLE);
|
||||
pcic_write(h, PCIC_INTR, reg);
|
||||
|
||||
isa_intr_disestablish(h->sc->intr_est, ih);
|
||||
isa_intr_disestablish(ic, ih);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: i82365_pci.c,v 1.2 1997/10/16 23:23:14 thorpej Exp $ */
|
||||
/* $NetBSD: i82365_pci.c,v 1.3 1998/05/23 18:32:30 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
|
||||
|
@ -211,6 +211,7 @@ pcic_pci_chip_intr_establish(pch, pf, ipl, fct, arg)
|
|||
void *arg;
|
||||
{
|
||||
struct pcic_handle *h = (struct pcic_handle *) pch;
|
||||
pci_chipset_tag_t pc = h->sc->intr_est;
|
||||
int irq;
|
||||
pci_intr_handle_t piht;
|
||||
void *ih;
|
||||
|
@ -223,12 +224,12 @@ pcic_pci_chip_intr_establish(pch, pf, ipl, fct, arg)
|
|||
|
||||
isa_intr_alloc(NULL, 0xffff, IST_PULSE, &irq);
|
||||
|
||||
if (pci_intr_map(h->sc->intr_est, pci_make_tag(NULL, 0, 0, 0),
|
||||
if (pci_intr_map(pc, pci_make_tag(NULL, 0, 0, 0),
|
||||
1, irq, &piht)) {
|
||||
printf("%s: couldn't map interrupt\n", h->sc->dev.dv_xname);
|
||||
return (NULL);
|
||||
}
|
||||
if ((ih = pci_intr_establish(h->sc->intr_est, piht, ipl, fct,
|
||||
if ((ih = pci_intr_establish(pc, piht, ipl, fct,
|
||||
arg)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
|
@ -248,6 +249,7 @@ pcic_pci_chip_intr_disestablish(pch, ih)
|
|||
void *ih;
|
||||
{
|
||||
struct pcic_handle *h = (struct pcic_handle *) pch;
|
||||
pci_chipset_tag_t pc = h->sc->intr_est;
|
||||
|
||||
pci_intr_disestablish(h->sc->intr_est, ih);
|
||||
pci_intr_disestablish(pc, ih);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue