Import 2.3.18pre1
[davej-history.git] / drivers / net / hplance.h
blob3af4c4d1fc6f281ef7245544c229c60bd249b408
1 /* Random defines and structures for the HP Lance driver.
2 * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk>
3 * Based on the Sun Lance driver and the NetBSD HP Lance driver
4 */
6 /* Registers */
7 struct hplance_reg
9 u_char pad0;
10 volatile u_char id; /* DIO register: ID byte */
11 u_char pad1;
12 volatile u_char status; /* DIO register: interrupt enable */
15 /* Control and status bits for the hplance->status register */
16 #define LE_IE 0x80 /* interrupt enable */
17 #define LE_IR 0x40 /* interrupt requested */
18 #define LE_LOCK 0x08 /* lock status register */
19 #define LE_ACK 0x04 /* ack of lock */
20 #define LE_JAB 0x02 /* loss of tx clock (???) */
21 /* We can also extract the IPL from the status register with the standard
22 * DIO_IPL(hplance) macro, or using dio_scodetoipl()
25 /* These are the offsets for the DIO regs (hplance_reg), lance_ioreg,
26 * memory and NVRAM:
28 #define HPLANCE_IDOFF 0 /* board baseaddr, struct hplance_reg */
29 #define HPLANCE_REGOFF 0x4000 /* struct lance_regs */
30 #define HPLANCE_MEMOFF 0x8000 /* struct lance_init_block */
31 #define HPLANCE_NVRAMOFF 0xC008 /* etheraddress as one *nibble* per byte */