sapcic_socket shouldn't use sacc_softc, use opaque data type instead.
This commit is contained in:
parent
340a8b97ca
commit
57755d7760
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sa11x1_pcic.c,v 1.6 2001/07/07 08:45:43 toshii Exp $ */
|
||||
/* $NetBSD: sa11x1_pcic.c,v 1.7 2001/07/09 05:19:05 toshii Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -135,9 +135,8 @@ sacpcic_attach(parent, self, aux)
|
|||
sc->sc_socket[i].sc = (struct sapcic_softc *)sc;
|
||||
sc->sc_socket[i].socket = i;
|
||||
sc->sc_socket[i].saip_sc = NULL;
|
||||
sc->sc_socket[i].sacc_sc = psc;
|
||||
sc->sc_socket[i].pcictag_cookie = psc;
|
||||
sc->sc_socket[i].pcictag = &sacpcic_functions;
|
||||
sc->sc_socket[i].pddata = NULL; /* XXX */
|
||||
sc->sc_socket[i].event_thread = NULL;
|
||||
sc->sc_socket[i].event = 0;
|
||||
sc->sc_socket[i].laststatus = SAPCIC_CARD_INVALID;
|
||||
|
@ -290,6 +289,7 @@ sacpcic_set_power(so, arg)
|
|||
{
|
||||
/* XXX this should go to dev/jornada720.c */
|
||||
int newval, oldval, s;
|
||||
struct sacc_softc *sc = so->pcictag_cookie;
|
||||
|
||||
/* XXX this isn't well confirmed. DANGER DANGER */
|
||||
switch (arg) {
|
||||
|
@ -307,7 +307,7 @@ sacpcic_set_power(so, arg)
|
|||
}
|
||||
|
||||
s = splbio();
|
||||
oldval = bus_space_read_4(so->sacc_sc->sc_iot, so->sacc_sc->sc_ioh,
|
||||
oldval = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
|
||||
SACCGPIOA_DVR);
|
||||
switch (so->socket) {
|
||||
case 0:
|
||||
|
@ -320,8 +320,7 @@ sacpcic_set_power(so, arg)
|
|||
splx(s);
|
||||
panic("sacpcic_set_power\n");
|
||||
}
|
||||
bus_space_write_4(so->sacc_sc->sc_iot, so->sacc_sc->sc_ioh,
|
||||
SACCGPIOA_DVR, newval);
|
||||
bus_space_write_4(sc->sc_iot, sc->sc_ioh, SACCGPIOA_DVR, newval);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
@ -341,7 +340,7 @@ sacpcic_intr_establish(so, level, ih_fun, ih_arg)
|
|||
int irq;
|
||||
|
||||
irq = so->socket ? IRQ_S1_READY : IRQ_S0_READY;
|
||||
return (sacc_intr_establish((sacc_chipset_tag_t)so->sacc_sc, irq,
|
||||
return (sacc_intr_establish((sacc_chipset_tag_t)so->pcictag_cookie, irq,
|
||||
IST_EDGE_FALL, level, ih_fun, ih_arg));
|
||||
}
|
||||
|
||||
|
@ -350,5 +349,5 @@ sacpcic_intr_disestablish(so, ih)
|
|||
struct sapcic_socket *so;
|
||||
void *ih;
|
||||
{
|
||||
sacc_intr_disestablish((sacc_chipset_tag_t)so->sacc_sc, ih);
|
||||
sacc_intr_disestablish((sacc_chipset_tag_t)so->pcictag_cookie, ih);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sa11xx_pcicvar.h,v 1.4 2001/07/07 08:45:43 toshii Exp $ */
|
||||
/* $NetBSD: sa11xx_pcicvar.h,v 1.5 2001/07/09 05:19:05 toshii Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -49,10 +49,8 @@ struct sapcic_socket {
|
|||
|
||||
int power_capability;
|
||||
|
||||
/* private data for pcictag functions */
|
||||
struct sa11x0_softc *saip_sc;
|
||||
struct sacc_softc *sacc_sc;
|
||||
void *pddata;
|
||||
void *pcictag_cookie; /* opaque data for pcictag functions */
|
||||
};
|
||||
|
||||
struct sapcic_tag {
|
||||
|
|
Loading…
Reference in New Issue