Lines Matching refs:dmfep

48 dmfe_read_eeprom(dmfe_t *dmfep, uint16_t raddr, uint8_t *ptr, int cnt)  in dmfe_read_eeprom()  argument
65 dmfe_chip_put32(dmfep, ETHER_ROM_REG, READ_EEPROM); in dmfe_read_eeprom()
67 dmfe_chip_put32(dmfep, ETHER_ROM_REG, READ_EEPROM_CS); in dmfe_read_eeprom()
69 dmfe_chip_put32(dmfep, ETHER_ROM_REG, READ_EEPROM_CS | SEL_CLK); in dmfe_read_eeprom()
71 dmfe_chip_put32(dmfep, ETHER_ROM_REG, READ_EEPROM_CS); in dmfe_read_eeprom()
80 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
83 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
86 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
96 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
99 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
102 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
111 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_read_eeprom()
115 if (dmfe_chip_get32(dmfep, ETHER_ROM_REG) & DATA_OUT) in dmfe_read_eeprom()
119 dmfe_chip_put32(dmfep, ETHER_ROM_REG, READ_EEPROM_CS); in dmfe_read_eeprom()
124 dmfe_chip_put32(dmfep, ETHER_ROM_REG, READ_EEPROM); in dmfe_read_eeprom()
146 dmfe_poke_mii(dmfe_t *dmfep, uint32_t mii_data, uint_t nbits) in dmfe_poke_mii() argument
150 ASSERT(mutex_owned(dmfep->milock)); in dmfe_poke_mii()
164 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_poke_mii()
167 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_poke_mii()
172 dmfe_chip_put32(dmfep, ETHER_ROM_REG, in dmfe_poke_mii()
182 dmfe_tristate_mii(dmfe_t *dmfep) in dmfe_tristate_mii() argument
184 ASSERT(mutex_owned(dmfep->milock)); in dmfe_tristate_mii()
186 dmfe_chip_put32(dmfep, ETHER_ROM_REG, MII_TRISTATE); in dmfe_tristate_mii()
188 dmfe_chip_put32(dmfep, ETHER_ROM_REG, MII_TRISTATE | MII_CLOCK); in dmfe_tristate_mii()
198 dmfe_mii_command(dmfe_t *dmfep, uint32_t command_word, int nbits) in dmfe_mii_command() argument
200 ASSERT(mutex_owned(dmfep->milock)); in dmfe_mii_command()
203 dmfe_poke_mii(dmfep, MII_PREAMBLE, 2*mii_reg_size); in dmfe_mii_command()
204 dmfe_poke_mii(dmfep, command_word, nbits); in dmfe_mii_command()
205 dmfe_tristate_mii(dmfep); in dmfe_mii_command()
209 dmfe_mii_response(dmfe_t *dmfep) in dmfe_mii_response() argument
217 tmp = dmfe_chip_get32(dmfep, ETHER_ROM_REG); in dmfe_mii_response()
222 dmfe_chip_put32(dmfep, ETHER_ROM_REG, MII_READ); in dmfe_mii_response()
224 dmfe_chip_put32(dmfep, ETHER_ROM_REG, MII_READ | MII_CLOCK); in dmfe_mii_response()
226 tmp = dmfe_chip_get32(dmfep, ETHER_ROM_REG); in dmfe_mii_response()
232 dmfe_tristate_mii(dmfep); in dmfe_mii_response()
244 dmfe_t *dmfep = arg; in dmfe_mii_write() local
248 mutex_enter(dmfep->milock); in dmfe_mii_write()
253 dmfe_mii_command(dmfep, command_word, 2*mii_reg_size); in dmfe_mii_write()
254 mutex_exit(dmfep->milock); in dmfe_mii_write()
260 dmfe_t *dmfep = arg; in dmfe_mii_read() local
269 mutex_enter(dmfep->milock); in dmfe_mii_read()
270 dmfe_mii_command(dmfep, command_word, mii_reg_size-2); in dmfe_mii_read()
272 rv = dmfe_mii_response(dmfep); in dmfe_mii_read()
273 mutex_exit(dmfep->milock); in dmfe_mii_read()
280 dmfe_t *dmfep = arg; in dmfe_mii_notify() local
283 mutex_enter(dmfep->oplock); in dmfe_mii_notify()
287 if (mii_get_duplex(dmfep->mii) == LINK_DUPLEX_FULL) { in dmfe_mii_notify()
288 dmfep->opmode |= FULL_DUPLEX; in dmfe_mii_notify()
290 dmfep->opmode &= ~FULL_DUPLEX; in dmfe_mii_notify()
292 dmfe_chip_put32(dmfep, OPN_MODE_REG, dmfep->opmode); in dmfe_mii_notify()
293 mutex_exit(dmfep->oplock); in dmfe_mii_notify()
295 mac_link_update(dmfep->mh, link); in dmfe_mii_notify()
312 dmfe_init_phy(dmfe_t *dmfep) in dmfe_init_phy() argument
314 dmfep->mii = mii_alloc(dmfep, dmfep->devinfo, &dmfe_mii_ops); in dmfe_init_phy()
315 if (dmfep->mii == NULL) { in dmfe_init_phy()