/* * get_e: gets a 16 bits word from the EEPROM. we must have set the window * before */ int ep_get_e(int offset) { if (!eeprom_rdy()) return 0xffff; outw(IS_BASE + EP_W0_EEPROM_COMMAND, EEPROM_CMD_RD | offset); if (!eeprom_rdy()) return 0xffff; return inw(IS_BASE + EP_W0_EEPROM_DATA); }
/* * get_e: gets a 16 bits word from the EEPROM. we must have set the window * before */ u_int16_t get_e(struct ep_softc *sc, int offset) { if (!eeprom_rdy(sc)) return (0); outw(BASE + EP_W0_EEPROM_COMMAND, (EEPROM_CMD_RD << sc->epb.cmd_off) | offset); if (!eeprom_rdy(sc)) return (0); return (inw(BASE + EP_W0_EEPROM_DATA)); }