summaryrefslogtreecommitdiffstats
path: root/drivers/atm/zeprom.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:27:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:27:49 +0000
commitace9429bb58fd418f0c81d4c2835699bddf6bde6 (patch)
treeb2d64bc10158fdd5497876388cd68142ca374ed3 /drivers/atm/zeprom.h
parentInitial commit. (diff)
downloadlinux-ace9429bb58fd418f0c81d4c2835699bddf6bde6.tar.xz
linux-ace9429bb58fd418f0c81d4c2835699bddf6bde6.zip
Adding upstream version 6.6.15.upstream/6.6.15
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/atm/zeprom.h')
-rw-r--r--drivers/atm/zeprom.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/atm/zeprom.h b/drivers/atm/zeprom.h
new file mode 100644
index 0000000000..8e8819a384
--- /dev/null
+++ b/drivers/atm/zeprom.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* drivers/atm/zeprom.h - ZeitNet ZN122x EEPROM (NM93C46) declarations */
+
+/* Written 1995,1996 by Werner Almesberger, EPFL LRC */
+
+
+#ifndef DRIVER_ATM_ZEPROM_H
+#define DRIVER_ATM_ZEPROM_H
+
+/* Different versions use different control registers */
+
+#define ZEPROM_V1_REG PCI_VENDOR_ID /* PCI register */
+#define ZEPROM_V2_REG 0x40
+
+/* Bits in control register */
+
+#define ZEPROM_SK 0x80000000 /* strobe (probably on raising edge) */
+#define ZEPROM_CS 0x40000000 /* Chip Select */
+#define ZEPROM_DI 0x20000000 /* Data Input */
+#define ZEPROM_DO 0x10000000 /* Data Output */
+
+#define ZEPROM_SIZE 32 /* 32 bytes */
+#define ZEPROM_V1_ESI_OFF 24 /* ESI offset in EEPROM (V1) */
+#define ZEPROM_V2_ESI_OFF 4 /* ESI offset in EEPROM (V2) */
+
+#define ZEPROM_CMD_LEN 3 /* commands are three bits */
+#define ZEPROM_ADDR_LEN 6 /* addresses are six bits */
+
+/* Commands (3 bits) */
+
+#define ZEPROM_CMD_READ 6
+
+/* No other commands are needed. */
+
+#endif