File: zeprom.h

package info (click to toggle)
linux 6.1.153-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,496,348 kB
  • sloc: ansic: 23,476,872; asm: 266,650; sh: 110,570; makefile: 49,899; python: 36,950; perl: 36,836; cpp: 6,055; yacc: 4,908; lex: 2,725; awk: 1,440; ruby: 25; sed: 5
file content (35 lines) | stat: -rw-r--r-- 984 bytes parent folder | download | duplicates (32)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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