• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/net/ixgb/

Lines Matching refs:hw

34 static u16 ixgb_shift_in_bits(struct ixgb_hw *hw);
36 static void ixgb_shift_out_bits(struct ixgb_hw *hw,
39 static void ixgb_standby_eeprom(struct ixgb_hw *hw);
41 static bool ixgb_wait_eeprom_command(struct ixgb_hw *hw);
43 static void ixgb_cleanup_eeprom(struct ixgb_hw *hw);
48 * hw - Struct containing variables accessed by shared code
52 ixgb_raise_clock(struct ixgb_hw *hw,
59 IXGB_WRITE_REG(hw, EECD, *eecd_reg);
66 * hw - Struct containing variables accessed by shared code
70 ixgb_lower_clock(struct ixgb_hw *hw,
77 IXGB_WRITE_REG(hw, EECD, *eecd_reg);
84 * hw - Struct containing variables accessed by shared code
89 ixgb_shift_out_bits(struct ixgb_hw *hw,
101 eecd_reg = IXGB_READ_REG(hw, EECD);
114 IXGB_WRITE_REG(hw, EECD, eecd_reg);
118 ixgb_raise_clock(hw, &eecd_reg);
119 ixgb_lower_clock(hw, &eecd_reg);
127 IXGB_WRITE_REG(hw, EECD, eecd_reg);
133 * hw - Struct containing variables accessed by shared code
136 ixgb_shift_in_bits(struct ixgb_hw *hw)
149 eecd_reg = IXGB_READ_REG(hw, EECD);
156 ixgb_raise_clock(hw, &eecd_reg);
158 eecd_reg = IXGB_READ_REG(hw, EECD);
164 ixgb_lower_clock(hw, &eecd_reg);
173 * hw - Struct containing variables accessed by shared code
179 ixgb_setup_eeprom(struct ixgb_hw *hw)
183 eecd_reg = IXGB_READ_REG(hw, EECD);
187 IXGB_WRITE_REG(hw, EECD, eecd_reg);
191 IXGB_WRITE_REG(hw, EECD, eecd_reg);
197 * hw - Struct containing variables accessed by shared code
200 ixgb_standby_eeprom(struct ixgb_hw *hw)
204 eecd_reg = IXGB_READ_REG(hw, EECD);
208 IXGB_WRITE_REG(hw, EECD, eecd_reg);
213 IXGB_WRITE_REG(hw, EECD, eecd_reg);
218 IXGB_WRITE_REG(hw, EECD, eecd_reg);
223 IXGB_WRITE_REG(hw, EECD, eecd_reg);
230 * hw - Struct containing variables accessed by shared code
233 ixgb_clock_eeprom(struct ixgb_hw *hw)
237 eecd_reg = IXGB_READ_REG(hw, EECD);
241 IXGB_WRITE_REG(hw, EECD, eecd_reg);
246 IXGB_WRITE_REG(hw, EECD, eecd_reg);
253 * hw - Struct containing variables accessed by shared code
256 ixgb_cleanup_eeprom(struct ixgb_hw *hw)
260 eecd_reg = IXGB_READ_REG(hw, EECD);
264 IXGB_WRITE_REG(hw, EECD, eecd_reg);
266 ixgb_clock_eeprom(hw);
272 * hw - Struct containing variables accessed by shared code
281 ixgb_wait_eeprom_command(struct ixgb_hw *hw)
289 ixgb_standby_eeprom(hw);
296 eecd_reg = IXGB_READ_REG(hw, EECD);
310 * hw - Struct containing variables accessed by shared code
321 ixgb_validate_eeprom_checksum(struct ixgb_hw *hw)
327 checksum += ixgb_read_eeprom(hw, i);
338 * hw - Struct containing variables accessed by shared code
344 ixgb_update_eeprom_checksum(struct ixgb_hw *hw)
350 checksum += ixgb_read_eeprom(hw, i);
354 ixgb_write_eeprom(hw, EEPROM_CHECKSUM_REG, checksum);
360 * hw - Struct containing variables accessed by shared code
369 ixgb_write_eeprom(struct ixgb_hw *hw, u16 offset, u16 data)
371 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
374 ixgb_setup_eeprom(hw);
379 ixgb_shift_out_bits(hw, EEPROM_EWEN_OPCODE, 5);
380 ixgb_shift_out_bits(hw, 0, 4);
383 ixgb_standby_eeprom(hw);
386 ixgb_shift_out_bits(hw, EEPROM_WRITE_OPCODE, 3);
387 ixgb_shift_out_bits(hw, offset, 6);
390 ixgb_shift_out_bits(hw, data, 16);
392 ixgb_wait_eeprom_command(hw);
395 ixgb_standby_eeprom(hw);
401 ixgb_shift_out_bits(hw, EEPROM_EWDS_OPCODE, 5);
402 ixgb_shift_out_bits(hw, 0, 4);
405 ixgb_cleanup_eeprom(hw);
414 * hw - Struct containing variables accessed by shared code
421 ixgb_read_eeprom(struct ixgb_hw *hw,
427 ixgb_setup_eeprom(hw);
430 ixgb_shift_out_bits(hw, EEPROM_READ_OPCODE, 3);
434 ixgb_shift_out_bits(hw, offset, 6);
437 data = ixgb_shift_in_bits(hw);
440 ixgb_standby_eeprom(hw);
449 * hw - Struct containing variables accessed by shared code
456 ixgb_get_eeprom_data(struct ixgb_hw *hw)
464 ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
469 ee_data = ixgb_read_eeprom(hw, i);
471 hw->eeprom[i] = cpu_to_le16(ee_data);
495 * hw - Struct containing variables accessed by shared code
502 ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
504 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
510 return ixgb_get_eeprom_data(hw);
517 * hw - Struct containing variables accessed by shared code
524 ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index)
528 (ixgb_check_and_get_eeprom_data(hw) == true)) {
529 return(hw->eeprom[index]);
538 * hw - Struct containing variables accessed by shared code
544 ixgb_get_ee_mac_addr(struct ixgb_hw *hw,
548 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
552 if (ixgb_check_and_get_eeprom_data(hw) == true) {
564 * hw - Struct containing variables accessed by shared code
570 ixgb_get_ee_pba_number(struct ixgb_hw *hw)
572 if (ixgb_check_and_get_eeprom_data(hw) == true)
573 return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG])
574 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16));
583 * hw - Struct containing variables accessed by shared code
589 ixgb_get_ee_device_id(struct ixgb_hw *hw)
591 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
593 if (ixgb_check_and_get_eeprom_data(hw) == true)