eisa_machdep.h revision 1.9
11.9Sfvdl/* $NetBSD: eisa_machdep.h,v 1.9 2002/10/01 12:57:05 fvdl Exp $ */ 21.1Scgd 31.1Scgd/* 41.1Scgd * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 51.1Scgd * 61.1Scgd * Redistribution and use in source and binary forms, with or without 71.1Scgd * modification, are permitted provided that the following conditions 81.1Scgd * are met: 91.1Scgd * 1. Redistributions of source code must retain the above copyright 101.1Scgd * notice, this list of conditions and the following disclaimer. 111.1Scgd * 2. Redistributions in binary form must reproduce the above copyright 121.1Scgd * notice, this list of conditions and the following disclaimer in the 131.1Scgd * documentation and/or other materials provided with the distribution. 141.1Scgd * 3. All advertising materials mentioning features or use of this software 151.1Scgd * must display the following acknowledgement: 161.1Scgd * This product includes software developed by Christopher G. Demetriou 171.1Scgd * for the NetBSD Project. 181.1Scgd * 4. The name of the author may not be used to endorse or promote products 191.1Scgd * derived from this software without specific prior written permission 201.1Scgd * 211.1Scgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Scgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Scgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Scgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Scgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Scgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Scgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Scgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Scgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 301.1Scgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Scgd */ 321.1Scgd 331.1Scgd/* 341.2Scgd * Machine-specific definitions for EISA autoconfiguration. 351.2Scgd */ 361.2Scgd 371.2Scgd/* 381.2Scgd * i386-specific EISA definitions. 391.2Scgd * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. 401.1Scgd */ 411.1Scgd#define EISA_ID "EISA" 421.1Scgd#define EISA_ID_LEN (sizeof(EISA_ID) - 1) 431.1Scgd#define EISA_ID_PADDR 0xfffd9 441.4Sthorpej 451.4Sthorpejextern struct i386_bus_dma_tag eisa_bus_dma_tag; 461.9Sfvdl 471.9Sfvdl/* EISA Edge/Level trigger control registers */ 481.9Sfvdl#define ELCR0 0x4d0 /* eisa irq 0-7 */ 491.9Sfvdl#define ELCR1 0x4d1 /* eisa irq 8-15 */ 501.2Scgd 511.2Scgd/* 521.2Scgd * Types provided to machine-independent EISA code. 531.2Scgd */ 541.2Scgdtypedef void *eisa_chipset_tag_t; 551.2Scgdtypedef int eisa_intr_handle_t; 561.2Scgd 571.2Scgd/* 581.2Scgd * Functions provided to machine-independent EISA code. 591.2Scgd */ 601.6Scgdvoid eisa_attach_hook(struct device *, struct device *, 611.6Scgd struct eisabus_attach_args *); 621.6Scgdint eisa_maxslots(eisa_chipset_tag_t); 631.6Scgdint eisa_intr_map(eisa_chipset_tag_t, u_int, 641.6Scgd eisa_intr_handle_t *); 651.6Scgdconst char *eisa_intr_string(eisa_chipset_tag_t, eisa_intr_handle_t); 661.7Scgdconst struct evcnt *eisa_intr_evcnt(eisa_chipset_tag_t, eisa_intr_handle_t); 671.6Scgdvoid *eisa_intr_establish(eisa_chipset_tag_t, 681.6Scgd eisa_intr_handle_t, int, int, int (*)(void *), void *); 691.6Scgdvoid eisa_intr_disestablish(eisa_chipset_tag_t, void *); 701.6Scgdint eisa_mem_alloc(bus_space_tag_t, bus_size_t, bus_size_t, 711.6Scgd bus_addr_t, int, bus_addr_t *, bus_space_handle_t *); 721.6Scgdvoid eisa_mem_free(bus_space_tag_t, bus_space_handle_t, 731.6Scgd bus_size_t); 741.8Sthorpej 751.8Sthorpejint eisa_conf_read_mem(eisa_chipset_tag_t, int, int, int, 761.8Sthorpej struct eisa_cfg_mem *); 771.8Sthorpejint eisa_conf_read_irq(eisa_chipset_tag_t, int, int, int, 781.8Sthorpej struct eisa_cfg_irq *); 791.8Sthorpejint eisa_conf_read_dma(eisa_chipset_tag_t, int, int, int, 801.8Sthorpej struct eisa_cfg_dma *); 811.8Sthorpejint eisa_conf_read_io(eisa_chipset_tag_t, int, int, int, 821.8Sthorpej struct eisa_cfg_io *); 83