Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* drivers/atm/zeprom.h - ZeitNet ZN122x EEPROM (NM93C46) declarations */
0003 
0004 /* Written 1995,1996 by Werner Almesberger, EPFL LRC */
0005 
0006 
0007 #ifndef DRIVER_ATM_ZEPROM_H
0008 #define DRIVER_ATM_ZEPROM_H
0009 
0010 /* Different versions use different control registers */
0011 
0012 #define ZEPROM_V1_REG   PCI_VENDOR_ID   /* PCI register */
0013 #define ZEPROM_V2_REG   0x40
0014 
0015 /* Bits in control register */
0016 
0017 #define ZEPROM_SK   0x80000000  /* strobe (probably on raising edge) */
0018 #define ZEPROM_CS   0x40000000  /* Chip Select */
0019 #define ZEPROM_DI   0x20000000  /* Data Input */
0020 #define ZEPROM_DO   0x10000000  /* Data Output */
0021 
0022 #define ZEPROM_SIZE 32      /* 32 bytes */
0023 #define ZEPROM_V1_ESI_OFF 24        /* ESI offset in EEPROM (V1) */
0024 #define ZEPROM_V2_ESI_OFF 4     /* ESI offset in EEPROM (V2) */
0025 
0026 #define ZEPROM_CMD_LEN  3       /* commands are three bits */
0027 #define ZEPROM_ADDR_LEN 6       /* addresses are six bits */
0028 
0029 /* Commands (3 bits) */
0030 
0031 #define ZEPROM_CMD_READ 6
0032 
0033 /* No other commands are needed. */
0034 
0035 #endif