ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / net / hplance.h
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  */
5
6 /* Registers */
7 struct hplance_reg
8 {
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 */
13 };
14
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()
23  */
24
25 /* These are the offsets for the DIO regs (hplance_reg), lance_ioreg,
26  * memory and NVRAM:
27  */
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 */