zeprom.h 983 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* drivers/atm/zeprom.h - ZeitNet ZN122x EEPROM (NM93C46) declarations */
  3. /* Written 1995,1996 by Werner Almesberger, EPFL LRC */
  4. #ifndef DRIVER_ATM_ZEPROM_H
  5. #define DRIVER_ATM_ZEPROM_H
  6. /* Different versions use different control registers */
  7. #define ZEPROM_V1_REG PCI_VENDOR_ID /* PCI register */
  8. #define ZEPROM_V2_REG 0x40
  9. /* Bits in contol register */
  10. #define ZEPROM_SK 0x80000000 /* strobe (probably on raising edge) */
  11. #define ZEPROM_CS 0x40000000 /* Chip Select */
  12. #define ZEPROM_DI 0x20000000 /* Data Input */
  13. #define ZEPROM_DO 0x10000000 /* Data Output */
  14. #define ZEPROM_SIZE 32 /* 32 bytes */
  15. #define ZEPROM_V1_ESI_OFF 24 /* ESI offset in EEPROM (V1) */
  16. #define ZEPROM_V2_ESI_OFF 4 /* ESI offset in EEPROM (V2) */
  17. #define ZEPROM_CMD_LEN 3 /* commands are three bits */
  18. #define ZEPROM_ADDR_LEN 6 /* addresses are six bits */
  19. /* Commands (3 bits) */
  20. #define ZEPROM_CMD_READ 6
  21. /* No other commands are needed. */
  22. #endif