zeprom.h 944 B

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