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