mca_machdep.h revision 1.3
11.3Scgd/* $NetBSD: mca_machdep.h,v 1.3 2000/06/04 19:14:45 cgd Exp $ */ 21.1Sjdolecek 31.1Sjdolecek/* 41.1Sjdolecek * Copyright (c) 2000 The NetBSD Foundation, Inc. 51.1Sjdolecek * Copyright (c) 1999 Scott D. Telford. All rights reserved. 61.1Sjdolecek * 71.1Sjdolecek * Redistribution and use in source and binary forms, with or without 81.1Sjdolecek * modification, are permitted provided that the following conditions 91.1Sjdolecek * are met: 101.1Sjdolecek * 1. Redistributions of source code must retain the above copyright 111.1Sjdolecek * notice, this list of conditions and the following disclaimer. 121.1Sjdolecek * 2. Redistributions in binary form must reproduce the above copyright 131.1Sjdolecek * notice, this list of conditions and the following disclaimer in the 141.1Sjdolecek * documentation and/or other materials provided with the distribution. 151.1Sjdolecek * 3. The name of the author may not be used to endorse or promote products 161.1Sjdolecek * derived from this software without specific prior written permission. 171.1Sjdolecek * 181.1Sjdolecek * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 191.1Sjdolecek * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 201.1Sjdolecek * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 211.1Sjdolecek * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 221.1Sjdolecek * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 231.1Sjdolecek * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 241.1Sjdolecek * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 251.1Sjdolecek * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 261.1Sjdolecek * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 271.1Sjdolecek * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 281.1Sjdolecek */ 291.1Sjdolecek 301.1Sjdolecek#ifndef _I386_MCA_MACHDEP_H_ 311.1Sjdolecek#define _I386_MCA_MACHDEP_H_ 321.1Sjdolecek 331.1Sjdolecek/* 341.1Sjdolecek * i386-specific definitions for MCA autoconfiguration. 351.1Sjdolecek */ 361.1Sjdolecek 371.1Sjdolecekextern struct i386_bus_dma_tag mca_bus_dma_tag; 381.1Sjdolecek 391.1Sjdolecek/* set to 1 if MCA bus is detected */ 401.1Sjdolecekextern int MCA_system; 411.1Sjdolecek 421.2Scgdint mca_nmi(void); 431.1Sjdolecek 441.1Sjdolecek/* 451.1Sjdolecek * Types provided to machine-independent MCA code. 461.1Sjdolecek */ 471.1Sjdolecekstruct i386_mca_chipset { 481.1Sjdolecek void * /*struct mca_dma_state*/ ic_dmastate; 491.1Sjdolecek}; 501.1Sjdolecek 511.1Sjdolecektypedef struct i386_mca_chipse *mca_chipset_tag_t; 521.1Sjdolecektypedef int mca_intr_handle_t; 531.1Sjdolecek 541.1Sjdolecek/* 551.1Sjdolecek * Functions provided to machine-independent MCA code. 561.1Sjdolecek */ 571.1Sjdolecekstruct mcabus_attach_args; 581.1Sjdolecek 591.2Scgdvoid mca_attach_hook(struct device *, struct device *, 601.2Scgd struct mcabus_attach_args *); 611.3Scgdconst struct evcnt *mca_intr_evcnt(mca_chipset_tag_t, mca_intr_handle_t); 621.2Scgdvoid *mca_intr_establish(mca_chipset_tag_t, mca_intr_handle_t, 631.2Scgd int, int (*)(void *), void *); 641.2Scgdvoid mca_intr_disestablish(mca_chipset_tag_t, void *); 651.2Scgdint mca_conf_read(mca_chipset_tag_t, int, int); 661.2Scgdvoid mca_conf_write(mca_chipset_tag_t, int, int, int); 671.2Scgdvoid mca_busprobe(void); 681.1Sjdolecek 691.1Sjdolecek/* MCA register addresses for IBM PS/2 */ 701.1Sjdolecek 711.1Sjdolecek#define PS2_SYS_CTL_A 0x92 /* PS/2 System Control Port A */ 721.1Sjdolecek#define MCA_MB_SETUP_REG 0x94 /* Motherboard setup register */ 731.1Sjdolecek#define MCA_ADAP_SETUP_REG 0x96 /* Adapter setup register */ 741.1Sjdolecek#define MCA_POS_REG_BASE 0x100 /* POS registers base address */ 751.1Sjdolecek#define MCA_POS_REG_SIZE 8 /* POS registers window size */ 761.1Sjdolecek 771.1Sjdolecek#define MCA_POS_REG(n) (0x100+(n)) /* POS registers 0-7 */ 781.1Sjdolecek 791.1Sjdolecek/* Adapter setup register bits */ 801.1Sjdolecek 811.1Sjdolecek#define MCA_ADAP_SET 0x08 /* Adapter setup mode */ 821.1Sjdolecek#define MCA_ADAP_CHR 0x80 /* Adapter channel reset */ 831.1Sjdolecek 841.1Sjdolecek#endif /* _I386_MCA_MACHDEP_H_ */ 85