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