Lines Matching refs:eec

50 static void ixgbe_raise_eeprom_clk(struct ixgbe_hw *hw, u32 *eec);
51 static void ixgbe_lower_eeprom_clk(struct ixgbe_hw *hw, u32 *eec);
74 u32 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_init_ops_generic() local
81 if (eec & IXGBE_EEC_PRES) { in ixgbe_init_ops_generic()
1255 u32 eec; in ixgbe_init_eeprom_params_generic() local
1272 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_init_eeprom_params_generic()
1273 if (eec & IXGBE_EEC_PRES) { in ixgbe_init_eeprom_params_generic()
1280 eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >> in ixgbe_init_eeprom_params_generic()
1286 if (eec & IXGBE_EEC_ADDR_SIZE) in ixgbe_init_eeprom_params_generic()
1823 u32 eec; in ixgbe_acquire_eeprom() local
1833 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_acquire_eeprom()
1836 eec |= IXGBE_EEC_REQ; in ixgbe_acquire_eeprom()
1837 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_acquire_eeprom()
1840 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_acquire_eeprom()
1841 if (eec & IXGBE_EEC_GNT) in ixgbe_acquire_eeprom()
1847 if (!(eec & IXGBE_EEC_GNT)) { in ixgbe_acquire_eeprom()
1848 eec &= ~IXGBE_EEC_REQ; in ixgbe_acquire_eeprom()
1849 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_acquire_eeprom()
1859 eec &= ~(IXGBE_EEC_CS | IXGBE_EEC_SK); in ixgbe_acquire_eeprom()
1860 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_acquire_eeprom()
2026 u32 eec; in ixgbe_standby_eeprom() local
2030 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_standby_eeprom()
2033 eec |= IXGBE_EEC_CS; in ixgbe_standby_eeprom()
2034 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_standby_eeprom()
2037 eec &= ~IXGBE_EEC_CS; in ixgbe_standby_eeprom()
2038 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_standby_eeprom()
2052 u32 eec; in ixgbe_shift_out_eeprom_bits() local
2058 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_shift_out_eeprom_bits()
2075 eec |= IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
2077 eec &= ~IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
2079 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_shift_out_eeprom_bits()
2084 ixgbe_raise_eeprom_clk(hw, &eec); in ixgbe_shift_out_eeprom_bits()
2085 ixgbe_lower_eeprom_clk(hw, &eec); in ixgbe_shift_out_eeprom_bits()
2095 eec &= ~IXGBE_EEC_DI; in ixgbe_shift_out_eeprom_bits()
2096 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_shift_out_eeprom_bits()
2107 u32 eec; in ixgbe_shift_in_eeprom_bits() local
2120 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_shift_in_eeprom_bits()
2122 eec &= ~(IXGBE_EEC_DO | IXGBE_EEC_DI); in ixgbe_shift_in_eeprom_bits()
2126 ixgbe_raise_eeprom_clk(hw, &eec); in ixgbe_shift_in_eeprom_bits()
2128 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_shift_in_eeprom_bits()
2130 eec &= ~(IXGBE_EEC_DI); in ixgbe_shift_in_eeprom_bits()
2131 if (eec & IXGBE_EEC_DO) in ixgbe_shift_in_eeprom_bits()
2134 ixgbe_lower_eeprom_clk(hw, &eec); in ixgbe_shift_in_eeprom_bits()
2145 static void ixgbe_raise_eeprom_clk(struct ixgbe_hw *hw, u32 *eec) in ixgbe_raise_eeprom_clk() argument
2153 *eec = *eec | IXGBE_EEC_SK; in ixgbe_raise_eeprom_clk()
2154 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), *eec); in ixgbe_raise_eeprom_clk()
2164 static void ixgbe_lower_eeprom_clk(struct ixgbe_hw *hw, u32 *eec) in ixgbe_lower_eeprom_clk() argument
2172 *eec = *eec & ~IXGBE_EEC_SK; in ixgbe_lower_eeprom_clk()
2173 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), *eec); in ixgbe_lower_eeprom_clk()
2184 u32 eec; in ixgbe_release_eeprom() local
2188 eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw)); in ixgbe_release_eeprom()
2190 eec |= IXGBE_EEC_CS; /* Pull CS high */ in ixgbe_release_eeprom()
2191 eec &= ~IXGBE_EEC_SK; /* Lower SCK */ in ixgbe_release_eeprom()
2193 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_release_eeprom()
2199 eec &= ~IXGBE_EEC_REQ; in ixgbe_release_eeprom()
2200 IXGBE_WRITE_REG(hw, IXGBE_EEC_BY_MAC(hw), eec); in ixgbe_release_eeprom()