version 1.3.4.4, 2002/10/18 02:42:24 |
version 1.3.4.5, 2002/12/11 06:38:11 |
Line 67 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 67 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#endif |
#endif |
|
|
|
|
int lm_isa_match __P((struct device *, struct cfdata *, void *)); |
int lm_isa_match(struct device *, struct cfdata *, void *); |
void lm_isa_attach __P((struct device *, struct device *, void *)); |
void lm_isa_attach(struct device *, struct device *, void *); |
|
u_int8_t lm_isa_readreg(struct lm_softc *, int); |
|
void lm_isa_writereg(struct lm_softc *, int, int); |
|
|
CFATTACH_DECL(lm_isa, sizeof(struct lm_softc), |
CFATTACH_DECL(lm_isa, sizeof(struct lm_softc), |
lm_isa_match, lm_isa_attach, NULL, NULL); |
lm_isa_match, lm_isa_attach, NULL, NULL); |
Line 140 lm_isa_attach(parent, self, aux) |
|
Line 142 lm_isa_attach(parent, self, aux) |
|
} |
} |
|
|
/* Bus-independant attachment */ |
/* Bus-independant attachment */ |
|
lmsc->lm_writereg = lm_isa_writereg; |
|
lmsc->lm_readreg = lm_isa_readreg; |
|
|
lm_attach(lmsc); |
lm_attach(lmsc); |
} |
} |
|
|
|
|
|
u_int8_t |
|
lm_isa_readreg(sc, reg) |
|
struct lm_softc *sc; |
|
int reg; |
|
{ |
|
bus_space_write_1(sc->lm_iot, sc->lm_ioh, LMC_ADDR, reg); |
|
return (bus_space_read_1(sc->lm_iot, sc->lm_ioh, LMC_DATA)); |
|
} |
|
|
|
|
|
void |
|
lm_isa_writereg(sc, reg, val) |
|
struct lm_softc *sc; |
|
int reg; |
|
int val; |
|
{ |
|
bus_space_write_1(sc->lm_iot, sc->lm_ioh, LMC_ADDR, reg); |
|
bus_space_write_1(sc->lm_iot, sc->lm_ioh, LMC_DATA, val); |
|
} |