Path: blob/master/arch/parisc/include/asm/eisa_eeprom.h
10819 views
/*1* eisa_eeprom.h - provide support for EISA adapters in PA-RISC machines2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation; either version6* 2 of the License, or (at your option) any later version.7*8* Copyright (c) 2001, 2002 Daniel Engstrom <[email protected]>9*10*/1112#ifndef ASM_EISA_EEPROM_H13#define ASM_EISA_EEPROM_H1415extern void __iomem *eisa_eeprom_addr;1617#define HPEE_MAX_LENGTH 0x2000 /* maximum eeprom length */1819#define HPEE_SLOT_INFO(slot) (20+(48*slot))2021struct eeprom_header22{2324u_int32_t num_writes; /* number of writes */25u_int8_t flags; /* flags, usage? */26u_int8_t ver_maj;27u_int8_t ver_min;28u_int8_t num_slots; /* number of EISA slots in system */29u_int16_t csum; /* checksum, I don't know how to calculate this */30u_int8_t pad[10];31} __attribute__ ((packed));323334struct eeprom_eisa_slot_info35{36u_int32_t eisa_slot_id;37u_int32_t config_data_offset;38u_int32_t num_writes;39u_int16_t csum;40u_int16_t num_functions;41u_int16_t config_data_length;4243/* bits 0..3 are the duplicate slot id */44#define HPEE_SLOT_INFO_EMBEDDED 0x1045#define HPEE_SLOT_INFO_VIRTUAL 0x2046#define HPEE_SLOT_INFO_NO_READID 0x4047#define HPEE_SLOT_INFO_DUPLICATE 0x8048u_int8_t slot_info;4950#define HPEE_SLOT_FEATURES_ENABLE 0x0151#define HPEE_SLOT_FEATURES_IOCHK 0x0252#define HPEE_SLOT_FEATURES_CFG_INCOMPLETE 0x8053u_int8_t slot_features;5455u_int8_t ver_min;56u_int8_t ver_maj;5758#define HPEE_FUNCTION_INFO_HAVE_TYPE 0x0159#define HPEE_FUNCTION_INFO_HAVE_MEMORY 0x0260#define HPEE_FUNCTION_INFO_HAVE_IRQ 0x0461#define HPEE_FUNCTION_INFO_HAVE_DMA 0x0862#define HPEE_FUNCTION_INFO_HAVE_PORT 0x1063#define HPEE_FUNCTION_INFO_HAVE_PORT_INIT 0x2064/* I think there are two slighty different65* versions of the function_info field66* one int the fixed header and one optional67* in the parsed slot data area */68#define HPEE_FUNCTION_INFO_HAVE_FUNCTION 0x0169#define HPEE_FUNCTION_INFO_F_DISABLED 0x8070#define HPEE_FUNCTION_INFO_CFG_FREE_FORM 0x4071u_int8_t function_info;7273#define HPEE_FLAG_BOARD_IS_ISA 0x01 /* flag and minor version for isa board */74u_int8_t flags;75u_int8_t pad[24];76} __attribute__ ((packed));777879#define HPEE_MEMORY_MAX_ENT 980/* memory descriptor: byte 0 */81#define HPEE_MEMORY_WRITABLE 0x0182#define HPEE_MEMORY_CACHABLE 0x0283#define HPEE_MEMORY_TYPE_MASK 0x1884#define HPEE_MEMORY_TYPE_SYS 0x0085#define HPEE_MEMORY_TYPE_EXP 0x0886#define HPEE_MEMORY_TYPE_VIR 0x1087#define HPEE_MEMORY_TYPE_OTH 0x1888#define HPEE_MEMORY_SHARED 0x2089#define HPEE_MEMORY_MORE 0x809091/* memory descriptor: byte 1 */92#define HPEE_MEMORY_WIDTH_MASK 0x0393#define HPEE_MEMORY_WIDTH_BYTE 0x0094#define HPEE_MEMORY_WIDTH_WORD 0x0195#define HPEE_MEMORY_WIDTH_DWORD 0x0296#define HPEE_MEMORY_DECODE_MASK 0x0c97#define HPEE_MEMORY_DECODE_20BITS 0x0098#define HPEE_MEMORY_DECODE_24BITS 0x0499#define HPEE_MEMORY_DECODE_32BITS 0x08100/* byte 2 and 3 are a 16bit LE value101* containging the memory size in kilobytes */102/* byte 4,5,6 are a 24bit LE value103* containing the memory base address */104105106#define HPEE_IRQ_MAX_ENT 7107/* Interrupt entry: byte 0 */108#define HPEE_IRQ_CHANNEL_MASK 0xf109#define HPEE_IRQ_TRIG_LEVEL 0x20110#define HPEE_IRQ_MORE 0x80111/* byte 1 seems to be unused */112113#define HPEE_DMA_MAX_ENT 4114115/* dma entry: byte 0 */116#define HPEE_DMA_CHANNEL_MASK 7117#define HPEE_DMA_SIZE_MASK 0xc118#define HPEE_DMA_SIZE_BYTE 0x0119#define HPEE_DMA_SIZE_WORD 0x4120#define HPEE_DMA_SIZE_DWORD 0x8121#define HPEE_DMA_SHARED 0x40122#define HPEE_DMA_MORE 0x80123124/* dma entry: byte 1 */125#define HPEE_DMA_TIMING_MASK 0x30126#define HPEE_DMA_TIMING_ISA 0x0127#define HPEE_DMA_TIMING_TYPEA 0x10128#define HPEE_DMA_TIMING_TYPEB 0x20129#define HPEE_DMA_TIMING_TYPEC 0x30130131#define HPEE_PORT_MAX_ENT 20132/* port entry byte 0 */133#define HPEE_PORT_SIZE_MASK 0x1f134#define HPEE_PORT_SHARED 0x40135#define HPEE_PORT_MORE 0x80136/* byte 1 and 2 is a 16bit LE value137* conating the start port number */138139#define HPEE_PORT_INIT_MAX_LEN 60 /* in bytes here */140/* port init entry byte 0 */141#define HPEE_PORT_INIT_WIDTH_MASK 0x3142#define HPEE_PORT_INIT_WIDTH_BYTE 0x0143#define HPEE_PORT_INIT_WIDTH_WORD 0x1144#define HPEE_PORT_INIT_WIDTH_DWORD 0x2145#define HPEE_PORT_INIT_MASK 0x4146#define HPEE_PORT_INIT_MORE 0x80147148#define HPEE_SELECTION_MAX_ENT 26149150#define HPEE_TYPE_MAX_LEN 80151152#endif153154155