Home | History | Annotate | Line # | Download | only in ioplanar
ioplanarvar.h revision 1.1
      1 /*-
      2  * Copyright (c) 2007 The NetBSD Foundation, Inc.
      3  * All rights reserved.
      4  *
      5  * This code is derived from software contributed to The NetBSD Foundation
      6  * by Tim Rightnour
      7  *
      8  * Redistribution and use in source and binary forms, with or without
      9  * modification, are permitted provided that the following conditions
     10  * are met:
     11  * 1. Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  * 2. Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in the
     15  *    documentation and/or other materials provided with the distribution.
     16  * 3. All advertising materials mentioning features or use of this software
     17  *    must display the following acknowledgement:
     18  *        This product includes software developed by the NetBSD
     19  *        Foundation, Inc. and its contributors.
     20  * 4. Neither the name of The NetBSD Foundation nor the names of its
     21  *    contributors may be used to endorse or promote products derived
     22  *    from this software without specific prior written permission.
     23  *
     24  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     25  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     26  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     27  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     28  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     34  * POSSIBILITY OF SUCH DAMAGE.
     35  */
     36 
     37 #ifndef _RS6000_IOPLANAR_H_
     38 #define _RS6000_IOPLANAR_H_
     39 
     40 #include <machine/bus.h>
     41 #include <machine/mca_machdep.h>
     42 
     43 /*
     44  * Driver attach args
     45  */
     46 struct ioplanar_dev_attach_args {
     47 	bus_space_tag_t idaa_iot;	/* I/O space tag */
     48 	bus_space_tag_t idaa_memt;	/* MEM space tag */
     49 	mca_chipset_tag_t idaa_mc;
     50 	bus_dma_tag_t idaa_dmat;	/* DMA tag */
     51 
     52 	uint16_t idaa_devid;		/* devid of the ioplanar */
     53 	int idaa_device;		/* devnum from below defines */
     54 };
     55 
     56 /* Master bus */
     57 struct ioplanar_softc {
     58 	struct device sc_dev;
     59 	mca_chipset_tag_t sc_ic;
     60 	bus_space_tag_t sc_iot;
     61 	bus_space_tag_t sc_memt;
     62 	bus_dma_tag_t sc_dmat;
     63 	uint16_t sc_devid;		/* devid of the ioplanar */
     64 };
     65 
     66 /*
     67  * These are the defines for the various devices we might find on an
     68  * ioplanar.  Because this is not a real bus, we have to basically tell
     69  * autoconf what we are looking for specifically, so it can find it.  Each
     70  * ioplanar has a specific set of devices that live on it, and those will
     71  * appear in a table.
     72  */
     73 
     74 #define IOP_COM0	1
     75 #define IOP_COM1	2
     76 #define IOP_COM0_2	3
     77 #define IOP_COM1_2	4
     78 #define IOP_COM0_3	5
     79 #define IOP_COM1_3	6
     80 #define IOP_COM2_3	7
     81 #define IOP_MOUSE	10
     82 #define IOP_KBD		11
     83 #define IOP_TABLET	12
     84 #define IOP_KBD_2	13
     85 #define IOP_TABLET_2	14
     86 #define IOP_LPD		20
     87 #define IOP_LPD_2	21
     88 #define IOP_FDC		30
     89 #define IOP_FDC_2	31
     90 #define IOP_FDC_3	32
     91 
     92 /*
     93  * The RS6000 defines a set of minimum IO configuration ports.  These are
     94  * basic services like serial, parallel, scsi, etc.  Per the definition, all
     95  * machines must respond on these ports for these services.
     96  */
     97 
     98 #define RSI_COM0	0x30
     99 #define RSI_COM0_LEN	8
    100 #define RSI_COM1	0x38
    101 #define RSI_COM1_LEN	8
    102 #define RSI_COM_DMA	0x40
    103 #define RSI_COM_DMA_LEN	1
    104 #define RSI_MOUSE	0x48
    105 #define RSI_MOUSE_LEN	8
    106 #define RSI_KBD		0x50
    107 #define RSI_KBD_LEN	10
    108 #define RSI_FLOPPY	0x60
    109 #define RSI_FLOPPY_LEN	9
    110 #define RSI_TABLET	0x70
    111 #define RSI_TABLEN_LEN	8
    112 #define RSI_PARALLEL	0x78
    113 #define RSI_PARALLEL_LEN	7
    114 #define RSI_SCSI	0x7f
    115 #define RSI_SCSI_LEN	96
    116 #define RSI_LAN		0xf0
    117 #define RSI_LAN_LEN	11
    118 
    119 #endif /* _RS6000_IOPLANAR_H_ */
    120