18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Random defines and structures for the HP Lance driver. 38c2ecf20Sopenharmony_ci * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk> 48c2ecf20Sopenharmony_ci * Based on the Sun Lance driver and the NetBSD HP Lance driver 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* Registers */ 88c2ecf20Sopenharmony_ci#define HPLANCE_ID 0x01 /* DIO register: ID byte */ 98c2ecf20Sopenharmony_ci#define HPLANCE_STATUS 0x03 /* DIO register: interrupt enable/status */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* Control and status bits for the status register */ 128c2ecf20Sopenharmony_ci#define LE_IE 0x80 /* interrupt enable */ 138c2ecf20Sopenharmony_ci#define LE_IR 0x40 /* interrupt requested */ 148c2ecf20Sopenharmony_ci#define LE_LOCK 0x08 /* lock status register */ 158c2ecf20Sopenharmony_ci#define LE_ACK 0x04 /* ack of lock */ 168c2ecf20Sopenharmony_ci#define LE_JAB 0x02 /* loss of tx clock (???) */ 178c2ecf20Sopenharmony_ci/* We can also extract the IPL from the status register with the standard 188c2ecf20Sopenharmony_ci * DIO_IPL(hplance) macro, or using dio_scodetoipl() 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* These are the offsets for the DIO regs (hplance_reg), lance_ioreg, 228c2ecf20Sopenharmony_ci * memory and NVRAM: 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci#define HPLANCE_IDOFF 0 /* board baseaddr */ 258c2ecf20Sopenharmony_ci#define HPLANCE_REGOFF 0x4000 /* lance registers */ 268c2ecf20Sopenharmony_ci#define HPLANCE_MEMOFF 0x8000 /* struct lance_init_block */ 278c2ecf20Sopenharmony_ci#define HPLANCE_NVRAMOFF 0xC008 /* etheraddress as one *nibble* per byte */ 28