Lines Matching full:eeprom
21 * Raises the EEPROM's clock input.
30 /* Raise the clock input to the EEPROM (by setting the SK bit), and then in ixgb_raise_clock()
40 * Lowers the EEPROM's clock input.
49 /* Lower the clock input to the EEPROM (by clearing the SK bit), and then in ixgb_lower_clock()
59 * Shift data bits out to the EEPROM.
62 * data - data to send to the EEPROM
73 /* We need to shift "count" bits out to the EEPROM. So, value in the in ixgb_shift_out_bits()
74 * "data" parameter will be shifted out to the EEPROM one bit at a time. in ixgb_shift_out_bits()
81 /* A "1" is shifted out to the EEPROM by setting bit "DI" to a "1", in ixgb_shift_out_bits()
83 * the clock input to the EEPROM). A "0" is shifted out to the EEPROM in ixgb_shift_out_bits()
109 * Shift data bits in from the EEPROM
120 /* In order to read a register from the EEPROM, we need to shift 16 bits in ixgb_shift_in_bits()
121 * in from the EEPROM. Bits are "shifted in" by raising the clock input to in ixgb_shift_in_bits()
122 * the EEPROM (setting the SK bit), and then reading the value of the "DO" in ixgb_shift_in_bits()
149 * Prepares EEPROM for access
153 * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This
154 * function should be called before issuing a command to the EEPROM.
173 * Returns EEPROM to a "standby" state
184 /* Deselect EEPROM */ in ixgb_standby_eeprom()
196 /* Select EEPROM */ in ixgb_standby_eeprom()
210 * Raises then lowers the EEPROM's clock pin
235 * Terminates a command by lowering the EEPROM's chip select pin
254 * Waits for the EEPROM to finish the current command.
258 * The command is done when the EEPROM's data out pin goes high.
261 * true: EEPROM data pin is high before timeout.
270 /* Toggle the CS line. This in effect tells to EEPROM to actually execute in ixgb_wait_eeprom_command()
275 /* Now read DO repeatedly until is high (equal to '1'). The EEPROM will in ixgb_wait_eeprom_command()
292 * Verifies that the EEPROM has a valid checksum
296 * Reads the first 64 16 bit words of the EEPROM and sums the values read.
297 * If the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is
320 * Calculates the EEPROM checksum and writes it to the EEPROM
324 * Sums the first 63 16 bit words of the EEPROM. Subtracts the sum from 0xBABA.
325 * Writes the difference to word offset 63 of the EEPROM.
342 * Writes a 16 bit word to a given offset in the EEPROM.
345 * reg - offset within the EEPROM to be written to
346 * data - 16 bit word to be written to the EEPROM
349 * EEPROM will most likely contain an invalid checksum.
355 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_write_eeprom()
357 /* Prepare the EEPROM for writing */ in ixgb_write_eeprom()
360 /* Send the 9-bit EWEN (write enable) command to the EEPROM (5-bit opcode in ixgb_write_eeprom()
361 * plus 4-bit dummy). This puts the EEPROM into write/erase mode. in ixgb_write_eeprom()
366 /* Prepare the EEPROM */ in ixgb_write_eeprom()
381 /* Send the 9-bit EWDS (write disable) command to the EEPROM (5-bit in ixgb_write_eeprom()
382 * opcode plus 4-bit dummy). This takes the EEPROM out of write/erase in ixgb_write_eeprom()
396 * Reads a 16 bit word from the EEPROM.
399 * offset - offset of 16 bit word in the EEPROM to read
402 * The 16-bit value read from the eeprom
410 /* Prepare the EEPROM for reading */ in ixgb_read_eeprom()
416 * We have a 64 word EEPROM, there are 6 address bits in ixgb_read_eeprom()
430 * Reads eeprom and stores data in shared structure.
431 * Validates eeprom checksum and eeprom signature.
436 * true: if eeprom read is successful
448 ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_get_eeprom_data()
450 pr_debug("Reading eeprom data\n"); in ixgb_get_eeprom_data()
455 hw->eeprom[i] = cpu_to_le16(ee_data); in ixgb_get_eeprom_data()
476 * Local function to check if the eeprom signature is good
477 * If the eeprom signature is good, calls ixgb)get_eeprom_data.
482 * true: eeprom signature was good and the eeprom read was successful
488 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_check_and_get_eeprom_data()
499 * return a word from the eeprom
502 * index - Offset of eeprom word
505 * Word at indexed offset in eeprom, if valid, 0 otherwise.
512 return hw->eeprom[index]; in ixgb_get_eeprom_word()
518 * return the mac address from EEPROM
521 * mac_addr - Ethernet Address if EEPROM contents are valid, 0 otherwise
530 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_get_ee_mac_addr()
538 pr_debug("eeprom mac address = %pM\n", mac_addr); in ixgb_get_ee_mac_addr()
544 * return the Printed Board Assembly number from EEPROM
549 * PBA number if EEPROM contents are valid, 0 otherwise
555 return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) in ixgb_get_ee_pba_number()
556 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16); in ixgb_get_ee_pba_number()
563 * return the Device Id from EEPROM
568 * Device Id if EEPROM contents are valid, 0 otherwise
573 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_get_ee_device_id()