Lines Matching refs:hw

40 static uint16_t ixgb_shift_in_bits(struct ixgb_hw *hw);
42 static void ixgb_shift_out_bits(struct ixgb_hw *hw,
45 static void ixgb_standby_eeprom(struct ixgb_hw *hw);
47 static boolean_t ixgb_wait_eeprom_command(struct ixgb_hw *hw);
49 static void ixgb_cleanup_eeprom(struct ixgb_hw *hw);
54 * hw - Struct containing variables accessed by shared code
58 ixgb_raise_clock(struct ixgb_hw *hw,
65 IXGB_WRITE_REG(hw, EECD, *eecd_reg);
73 * hw - Struct containing variables accessed by shared code
77 ixgb_lower_clock(struct ixgb_hw *hw,
84 IXGB_WRITE_REG(hw, EECD, *eecd_reg);
92 * hw - Struct containing variables accessed by shared code
97 ixgb_shift_out_bits(struct ixgb_hw *hw,
109 eecd_reg = IXGB_READ_REG(hw, EECD);
122 IXGB_WRITE_REG(hw, EECD, eecd_reg);
126 ixgb_raise_clock(hw, &eecd_reg);
127 ixgb_lower_clock(hw, &eecd_reg);
135 IXGB_WRITE_REG(hw, EECD, eecd_reg);
142 * hw - Struct containing variables accessed by shared code
145 ixgb_shift_in_bits(struct ixgb_hw *hw)
158 eecd_reg = IXGB_READ_REG(hw, EECD);
165 ixgb_raise_clock(hw, &eecd_reg);
167 eecd_reg = IXGB_READ_REG(hw, EECD);
173 ixgb_lower_clock(hw, &eecd_reg);
182 * hw - Struct containing variables accessed by shared code
188 ixgb_setup_eeprom(struct ixgb_hw *hw)
192 eecd_reg = IXGB_READ_REG(hw, EECD);
196 IXGB_WRITE_REG(hw, EECD, eecd_reg);
200 IXGB_WRITE_REG(hw, EECD, eecd_reg);
207 * hw - Struct containing variables accessed by shared code
210 ixgb_standby_eeprom(struct ixgb_hw *hw)
214 eecd_reg = IXGB_READ_REG(hw, EECD);
218 IXGB_WRITE_REG(hw, EECD, eecd_reg);
223 IXGB_WRITE_REG(hw, EECD, eecd_reg);
228 IXGB_WRITE_REG(hw, EECD, eecd_reg);
233 IXGB_WRITE_REG(hw, EECD, eecd_reg);
241 * hw - Struct containing variables accessed by shared code
244 ixgb_clock_eeprom(struct ixgb_hw *hw)
248 eecd_reg = IXGB_READ_REG(hw, EECD);
252 IXGB_WRITE_REG(hw, EECD, eecd_reg);
257 IXGB_WRITE_REG(hw, EECD, eecd_reg);
265 * hw - Struct containing variables accessed by shared code
268 ixgb_cleanup_eeprom(struct ixgb_hw *hw)
272 eecd_reg = IXGB_READ_REG(hw, EECD);
276 IXGB_WRITE_REG(hw, EECD, eecd_reg);
278 ixgb_clock_eeprom(hw);
285 * hw - Struct containing variables accessed by shared code
294 ixgb_wait_eeprom_command(struct ixgb_hw *hw)
303 ixgb_standby_eeprom(hw);
310 eecd_reg = IXGB_READ_REG(hw, EECD);
325 * hw - Struct containing variables accessed by shared code
336 ixgb_validate_eeprom_checksum(struct ixgb_hw *hw)
342 checksum += ixgb_read_eeprom(hw, i);
353 * hw - Struct containing variables accessed by shared code
359 ixgb_update_eeprom_checksum(struct ixgb_hw *hw)
365 checksum += ixgb_read_eeprom(hw, i);
369 ixgb_write_eeprom(hw, EEPROM_CHECKSUM_REG, checksum);
376 * hw - Struct containing variables accessed by shared code
385 ixgb_write_eeprom(struct ixgb_hw *hw,
390 ixgb_setup_eeprom(hw);
395 ixgb_shift_out_bits(hw, EEPROM_EWEN_OPCODE, 5);
396 ixgb_shift_out_bits(hw, 0, 4);
399 ixgb_standby_eeprom(hw);
402 ixgb_shift_out_bits(hw, EEPROM_WRITE_OPCODE, 3);
403 ixgb_shift_out_bits(hw, offset, 6);
406 ixgb_shift_out_bits(hw, data, 16);
408 ixgb_wait_eeprom_command(hw);
411 ixgb_standby_eeprom(hw);
417 ixgb_shift_out_bits(hw, EEPROM_EWDS_OPCODE, 5);
418 ixgb_shift_out_bits(hw, 0, 4);
421 ixgb_cleanup_eeprom(hw);
429 * hw - Struct containing variables accessed by shared code
436 ixgb_read_eeprom(struct ixgb_hw *hw,
442 ixgb_setup_eeprom(hw);
445 ixgb_shift_out_bits(hw, EEPROM_READ_OPCODE, 3);
449 ixgb_shift_out_bits(hw, offset, 6);
452 data = ixgb_shift_in_bits(hw);
455 ixgb_standby_eeprom(hw);
464 * hw - Struct containing variables accessed by shared code
471 ixgb_get_eeprom_data(struct ixgb_hw *hw)
479 ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
484 ee_data = ixgb_read_eeprom(hw, i);
486 hw->eeprom[i] = le16_to_cpu (ee_data);
508 * hw - Struct containing variables accessed by shared code
515 ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
517 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
524 return ixgb_get_eeprom_data(hw);
531 * hw - Struct containing variables accessed by shared code
538 ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index)
542 (ixgb_check_and_get_eeprom_data (hw) == TRUE)) {
543 return(hw->eeprom[index]);
553 * hw - Struct containing variables accessed by shared code
559 ixgb_get_ee_mac_addr(struct ixgb_hw *hw,
563 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
567 if (ixgb_check_and_get_eeprom_data (hw) == TRUE) {
578 * hw - Struct containing variables accessed by shared code
584 ixgb_get_ee_compatibility(struct ixgb_hw *hw)
586 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
588 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
597 * hw - Struct containing variables accessed by shared code
603 ixgb_get_ee_pba_number(struct ixgb_hw *hw)
605 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
606 return ( le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG])
607 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16));
615 * hw - Struct containing variables accessed by shared code
621 ixgb_get_ee_init_ctrl_reg_1(struct ixgb_hw *hw)
623 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
625 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
634 * hw - Struct containing variables accessed by shared code
640 ixgb_get_ee_init_ctrl_reg_2(struct ixgb_hw *hw)
642 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
644 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
653 * hw - Struct containing variables accessed by shared code
659 ixgb_get_ee_subsystem_id(struct ixgb_hw *hw)
661 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
663 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
672 * hw - Struct containing variables accessed by shared code
678 ixgb_get_ee_subvendor_id(struct ixgb_hw *hw)
680 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
682 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
691 * hw - Struct containing variables accessed by shared code
697 ixgb_get_ee_device_id(struct ixgb_hw *hw)
699 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
701 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
710 * hw - Struct containing variables accessed by shared code
716 ixgb_get_ee_vendor_id(struct ixgb_hw *hw)
718 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
720 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
729 * hw - Struct containing variables accessed by shared code
735 ixgb_get_ee_swdpins_reg(struct ixgb_hw *hw)
737 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
739 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
748 * hw - Struct containing variables accessed by shared code
754 ixgb_get_ee_d3_power(struct ixgb_hw *hw)
756 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
758 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)
767 * hw - Struct containing variables accessed by shared code
773 ixgb_get_ee_d0_power(struct ixgb_hw *hw)
775 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *) hw->eeprom;
777 if (ixgb_check_and_get_eeprom_data (hw) == TRUE)