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);
787 u32 eec; in ixgbe_init_eeprom_params_generic() local
802 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_init_eeprom_params_generic()
803 if (eec & IXGBE_EEC_PRES) { in ixgbe_init_eeprom_params_generic()
810 eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >> in ixgbe_init_eeprom_params_generic()
816 if (eec & IXGBE_EEC_ADDR_SIZE) in ixgbe_init_eeprom_params_generic()
1280 u32 eec; in ixgbe_acquire_eeprom() local
1286 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_acquire_eeprom()
1289 eec |= IXGBE_EEC_REQ; in ixgbe_acquire_eeprom()
1290 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_acquire_eeprom()
1293 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_acquire_eeprom()
1294 if (eec & IXGBE_EEC_GNT) in ixgbe_acquire_eeprom()
1300 if (!(eec & IXGBE_EEC_GNT)) { in ixgbe_acquire_eeprom()
1301 eec &= ~IXGBE_EEC_REQ; in ixgbe_acquire_eeprom()
1302 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_acquire_eeprom()
1311 eec &= ~(IXGBE_EEC_CS | IXGBE_EEC_SK); in ixgbe_acquire_eeprom()
1312 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_acquire_eeprom()
1455 u32 eec; in ixgbe_standby_eeprom() local
1457 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_standby_eeprom()
1460 eec |= IXGBE_EEC_CS; in ixgbe_standby_eeprom()
1461 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_standby_eeprom()
1464 eec &= ~IXGBE_EEC_CS; in ixgbe_standby_eeprom()
1465 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_standby_eeprom()
1479 u32 eec; in ixgbe_shift_out_eeprom_bits() local
1483 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_shift_out_eeprom_bits()
1500 eec |= IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
1502 eec &= ~IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
1504 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_shift_out_eeprom_bits()
1509 ixgbe_raise_eeprom_clk(hw, &eec); in ixgbe_shift_out_eeprom_bits()
1510 ixgbe_lower_eeprom_clk(hw, &eec); in ixgbe_shift_out_eeprom_bits()
1520 eec &= ~IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
1521 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_shift_out_eeprom_bits()
1531 u32 eec; in ixgbe_shift_in_eeprom_bits() local
1542 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_shift_in_eeprom_bits()
1544 eec &= ~(IXGBE_EEC_DO | IXGBE_EEC_DI); in ixgbe_shift_in_eeprom_bits()
1548 ixgbe_raise_eeprom_clk(hw, &eec); in ixgbe_shift_in_eeprom_bits()
1550 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_shift_in_eeprom_bits()
1552 eec &= ~(IXGBE_EEC_DI); in ixgbe_shift_in_eeprom_bits()
1553 if (eec & IXGBE_EEC_DO) in ixgbe_shift_in_eeprom_bits()
1556 ixgbe_lower_eeprom_clk(hw, &eec); in ixgbe_shift_in_eeprom_bits()
1567 static void ixgbe_raise_eeprom_clk(struct ixgbe_hw *hw, u32 *eec) in ixgbe_raise_eeprom_clk() argument
1573 *eec = *eec | IXGBE_EEC_SK; in ixgbe_raise_eeprom_clk()
1574 IXGBE_WRITE_REG(hw, IXGBE_EEC, *eec); in ixgbe_raise_eeprom_clk()
1584 static void ixgbe_lower_eeprom_clk(struct ixgbe_hw *hw, u32 *eec) in ixgbe_lower_eeprom_clk() argument
1590 *eec = *eec & ~IXGBE_EEC_SK; in ixgbe_lower_eeprom_clk()
1591 IXGBE_WRITE_REG(hw, IXGBE_EEC, *eec); in ixgbe_lower_eeprom_clk()
1602 u32 eec; in ixgbe_release_eeprom() local
1604 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_release_eeprom()
1606 eec |= IXGBE_EEC_CS; /* Pull CS high */ in ixgbe_release_eeprom()
1607 eec &= ~IXGBE_EEC_SK; /* Lower SCK */ in ixgbe_release_eeprom()
1609 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_release_eeprom()
1615 eec &= ~IXGBE_EEC_REQ; in ixgbe_release_eeprom()
1616 IXGBE_WRITE_REG(hw, IXGBE_EEC, eec); in ixgbe_release_eeprom()