Path: blob/master/arch/parisc/include/asm/eisa_eeprom.h
26298 views
/* SPDX-License-Identifier: GPL-2.0-or-later */1/*2* eisa_eeprom.h - provide support for EISA adapters in PA-RISC machines3*4* Copyright (c) 2001, 2002 Daniel Engstrom <[email protected]>5*/67#ifndef ASM_EISA_EEPROM_H8#define ASM_EISA_EEPROM_H910extern void __iomem *eisa_eeprom_addr;1112#define HPEE_MAX_LENGTH 0x2000 /* maximum eeprom length */1314#define HPEE_SLOT_INFO(slot) (20+(48*slot))1516struct eeprom_header17{1819u_int32_t num_writes; /* number of writes */20u_int8_t flags; /* flags, usage? */21u_int8_t ver_maj;22u_int8_t ver_min;23u_int8_t num_slots; /* number of EISA slots in system */24u_int16_t csum; /* checksum, I don't know how to calculate this */25u_int8_t pad[10];26} __attribute__ ((packed));272829struct eeprom_eisa_slot_info30{31u_int32_t eisa_slot_id;32u_int32_t config_data_offset;33u_int32_t num_writes;34u_int16_t csum;35u_int16_t num_functions;36u_int16_t config_data_length;3738/* bits 0..3 are the duplicate slot id */39#define HPEE_SLOT_INFO_EMBEDDED 0x1040#define HPEE_SLOT_INFO_VIRTUAL 0x2041#define HPEE_SLOT_INFO_NO_READID 0x4042#define HPEE_SLOT_INFO_DUPLICATE 0x8043u_int8_t slot_info;4445#define HPEE_SLOT_FEATURES_ENABLE 0x0146#define HPEE_SLOT_FEATURES_IOCHK 0x0247#define HPEE_SLOT_FEATURES_CFG_INCOMPLETE 0x8048u_int8_t slot_features;4950u_int8_t ver_min;51u_int8_t ver_maj;5253#define HPEE_FUNCTION_INFO_HAVE_TYPE 0x0154#define HPEE_FUNCTION_INFO_HAVE_MEMORY 0x0255#define HPEE_FUNCTION_INFO_HAVE_IRQ 0x0456#define HPEE_FUNCTION_INFO_HAVE_DMA 0x0857#define HPEE_FUNCTION_INFO_HAVE_PORT 0x1058#define HPEE_FUNCTION_INFO_HAVE_PORT_INIT 0x2059/* I think there are two slighty different60* versions of the function_info field61* one int the fixed header and one optional62* in the parsed slot data area */63#define HPEE_FUNCTION_INFO_HAVE_FUNCTION 0x0164#define HPEE_FUNCTION_INFO_F_DISABLED 0x8065#define HPEE_FUNCTION_INFO_CFG_FREE_FORM 0x4066u_int8_t function_info;6768#define HPEE_FLAG_BOARD_IS_ISA 0x01 /* flag and minor version for isa board */69u_int8_t flags;70u_int8_t pad[24];71} __attribute__ ((packed));727374#define HPEE_MEMORY_MAX_ENT 975/* memory descriptor: byte 0 */76#define HPEE_MEMORY_WRITABLE 0x0177#define HPEE_MEMORY_CACHABLE 0x0278#define HPEE_MEMORY_TYPE_MASK 0x1879#define HPEE_MEMORY_TYPE_SYS 0x0080#define HPEE_MEMORY_TYPE_EXP 0x0881#define HPEE_MEMORY_TYPE_VIR 0x1082#define HPEE_MEMORY_TYPE_OTH 0x1883#define HPEE_MEMORY_SHARED 0x2084#define HPEE_MEMORY_MORE 0x808586/* memory descriptor: byte 1 */87#define HPEE_MEMORY_WIDTH_MASK 0x0388#define HPEE_MEMORY_WIDTH_BYTE 0x0089#define HPEE_MEMORY_WIDTH_WORD 0x0190#define HPEE_MEMORY_WIDTH_DWORD 0x0291#define HPEE_MEMORY_DECODE_MASK 0x0c92#define HPEE_MEMORY_DECODE_20BITS 0x0093#define HPEE_MEMORY_DECODE_24BITS 0x0494#define HPEE_MEMORY_DECODE_32BITS 0x0895/* byte 2 and 3 are a 16bit LE value96* containing the memory size in kilobytes */97/* byte 4,5,6 are a 24bit LE value98* containing the memory base address */99100101#define HPEE_IRQ_MAX_ENT 7102/* Interrupt entry: byte 0 */103#define HPEE_IRQ_CHANNEL_MASK 0xf104#define HPEE_IRQ_TRIG_LEVEL 0x20105#define HPEE_IRQ_MORE 0x80106/* byte 1 seems to be unused */107108#define HPEE_DMA_MAX_ENT 4109110/* dma entry: byte 0 */111#define HPEE_DMA_CHANNEL_MASK 7112#define HPEE_DMA_SIZE_MASK 0xc113#define HPEE_DMA_SIZE_BYTE 0x0114#define HPEE_DMA_SIZE_WORD 0x4115#define HPEE_DMA_SIZE_DWORD 0x8116#define HPEE_DMA_SHARED 0x40117#define HPEE_DMA_MORE 0x80118119/* dma entry: byte 1 */120#define HPEE_DMA_TIMING_MASK 0x30121#define HPEE_DMA_TIMING_ISA 0x0122#define HPEE_DMA_TIMING_TYPEA 0x10123#define HPEE_DMA_TIMING_TYPEB 0x20124#define HPEE_DMA_TIMING_TYPEC 0x30125126#define HPEE_PORT_MAX_ENT 20127/* port entry byte 0 */128#define HPEE_PORT_SIZE_MASK 0x1f129#define HPEE_PORT_SHARED 0x40130#define HPEE_PORT_MORE 0x80131/* byte 1 and 2 is a 16bit LE value132* containing the start port number */133134#define HPEE_PORT_INIT_MAX_LEN 60 /* in bytes here */135/* port init entry byte 0 */136#define HPEE_PORT_INIT_WIDTH_MASK 0x3137#define HPEE_PORT_INIT_WIDTH_BYTE 0x0138#define HPEE_PORT_INIT_WIDTH_WORD 0x1139#define HPEE_PORT_INIT_WIDTH_DWORD 0x2140#define HPEE_PORT_INIT_MASK 0x4141#define HPEE_PORT_INIT_MORE 0x80142143#define HPEE_SELECTION_MAX_ENT 26144145#define HPEE_TYPE_MAX_LEN 80146147#endif148149150