1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* Random defines and structures for the HP Lance driver. 3*4882a593Smuzhiyun * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk> 4*4882a593Smuzhiyun * Based on the Sun Lance driver and the NetBSD HP Lance driver 5*4882a593Smuzhiyun */ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun /* Registers */ 8*4882a593Smuzhiyun #define HPLANCE_ID 0x01 /* DIO register: ID byte */ 9*4882a593Smuzhiyun #define HPLANCE_STATUS 0x03 /* DIO register: interrupt enable/status */ 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun /* Control and status bits for the status register */ 12*4882a593Smuzhiyun #define LE_IE 0x80 /* interrupt enable */ 13*4882a593Smuzhiyun #define LE_IR 0x40 /* interrupt requested */ 14*4882a593Smuzhiyun #define LE_LOCK 0x08 /* lock status register */ 15*4882a593Smuzhiyun #define LE_ACK 0x04 /* ack of lock */ 16*4882a593Smuzhiyun #define LE_JAB 0x02 /* loss of tx clock (???) */ 17*4882a593Smuzhiyun /* We can also extract the IPL from the status register with the standard 18*4882a593Smuzhiyun * DIO_IPL(hplance) macro, or using dio_scodetoipl() 19*4882a593Smuzhiyun */ 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* These are the offsets for the DIO regs (hplance_reg), lance_ioreg, 22*4882a593Smuzhiyun * memory and NVRAM: 23*4882a593Smuzhiyun */ 24*4882a593Smuzhiyun #define HPLANCE_IDOFF 0 /* board baseaddr */ 25*4882a593Smuzhiyun #define HPLANCE_REGOFF 0x4000 /* lance registers */ 26*4882a593Smuzhiyun #define HPLANCE_MEMOFF 0x8000 /* struct lance_init_block */ 27*4882a593Smuzhiyun #define HPLANCE_NVRAMOFF 0xC008 /* etheraddress as one *nibble* per byte */ 28