Lines Matching refs:eec
46 static void ixgbe_raise_eeprom_clk(struct ixgbe_hw *hw, u32 *eec);
47 static void ixgbe_lower_eeprom_clk(struct ixgbe_hw *hw, u32 *eec);
794 u32 eec; in ixgbe_init_eeprom_params_generic() local
809 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_init_eeprom_params_generic()
810 if (eec & IXGBE_EEC_PRES) { in ixgbe_init_eeprom_params_generic()
817 eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >> in ixgbe_init_eeprom_params_generic()
823 if (eec & IXGBE_EEC_ADDR_SIZE) in ixgbe_init_eeprom_params_generic()
1287 u32 eec; in ixgbe_acquire_eeprom() local
1293 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_acquire_eeprom()
1296 eec |= IXGBE_EEC_REQ; in ixgbe_acquire_eeprom()
1297 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_acquire_eeprom()
1300 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_acquire_eeprom()
1301 if (eec & IXGBE_EEC_GNT) in ixgbe_acquire_eeprom()
1307 if (!(eec & IXGBE_EEC_GNT)) { in ixgbe_acquire_eeprom()
1308 eec &= ~IXGBE_EEC_REQ; in ixgbe_acquire_eeprom()
1309 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_acquire_eeprom()
1318 eec &= ~(IXGBE_EEC_CS | IXGBE_EEC_SK); in ixgbe_acquire_eeprom()
1319 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_acquire_eeprom()
1462 u32 eec; in ixgbe_standby_eeprom() local
1464 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_standby_eeprom()
1467 eec |= IXGBE_EEC_CS; in ixgbe_standby_eeprom()
1468 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_standby_eeprom()
1471 eec &= ~IXGBE_EEC_CS; in ixgbe_standby_eeprom()
1472 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_standby_eeprom()
1486 u32 eec; in ixgbe_shift_out_eeprom_bits() local
1490 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_shift_out_eeprom_bits()
1507 eec |= IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
1509 eec &= ~IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
1511 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_shift_out_eeprom_bits()
1516 ixgbe_raise_eeprom_clk(hw, &eec); in ixgbe_shift_out_eeprom_bits()
1517 ixgbe_lower_eeprom_clk(hw, &eec); in ixgbe_shift_out_eeprom_bits()
1527 eec &= ~IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
1528 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_shift_out_eeprom_bits()
1538 u32 eec; in ixgbe_shift_in_eeprom_bits() local
1549 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_shift_in_eeprom_bits()
1551 eec &= ~(IXGBE_EEC_DO | IXGBE_EEC_DI); in ixgbe_shift_in_eeprom_bits()
1555 ixgbe_raise_eeprom_clk(hw, &eec); in ixgbe_shift_in_eeprom_bits()
1557 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_shift_in_eeprom_bits()
1559 eec &= ~(IXGBE_EEC_DI); in ixgbe_shift_in_eeprom_bits()
1560 if (eec & IXGBE_EEC_DO) in ixgbe_shift_in_eeprom_bits()
1563 ixgbe_lower_eeprom_clk(hw, &eec); in ixgbe_shift_in_eeprom_bits()
1574 static void ixgbe_raise_eeprom_clk(struct ixgbe_hw *hw, u32 *eec) in ixgbe_raise_eeprom_clk() argument
1580 *eec = *eec | IXGBE_EEC_SK; in ixgbe_raise_eeprom_clk()
1581 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), *eec); in ixgbe_raise_eeprom_clk()
1591 static void ixgbe_lower_eeprom_clk(struct ixgbe_hw *hw, u32 *eec) in ixgbe_lower_eeprom_clk() argument
1597 *eec = *eec & ~IXGBE_EEC_SK; in ixgbe_lower_eeprom_clk()
1598 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), *eec); in ixgbe_lower_eeprom_clk()
1609 u32 eec; in ixgbe_release_eeprom() local
1611 eec = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_release_eeprom()
1613 eec |= IXGBE_EEC_CS; /* Pull CS high */ in ixgbe_release_eeprom()
1614 eec &= ~IXGBE_EEC_SK; /* Lower SCK */ in ixgbe_release_eeprom()
1616 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_release_eeprom()
1622 eec &= ~IXGBE_EEC_REQ; in ixgbe_release_eeprom()
1623 IXGBE_WRITE_REG(hw, IXGBE_EEC(hw), eec); in ixgbe_release_eeprom()