revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-amiga / hidd / pci-mediator / empbreg.h
blobbd9ff7d4104d81d4f412a6b2ab966ccb6d806056
1 /* $NetBSD: empbreg.h,v 1.1 2012/05/30 18:01:51 rkujawa Exp $ */
3 /*-
4 * Copyright (c) 2012 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Radoslaw Kujawa.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * Elbox Mediator registers. This information was obtained using reverse
34 * engineering methods by Frank Wille and Radoslaw Kujawa (without access to
35 * official documentation).
38 #ifndef _AMIGA_EMPBREG_H_
40 /* Zorro IDs */
41 #define ZORRO_MANID_ELBOX 2206
42 #define ZORRO_PRODID_MEDZIII 30 /* Z-III DMA 4 IRQ */
43 #define ZORRO_PRODID_MEDZIV 31 /* Z-IV Bounce 4 IRQ */
44 #define ZORRO_PRODID_MED1K2 32 /* 1200 Bounce */
45 #define ZORRO_PRODID_MED4K 33 /* 3000D/4000D DMA 4 IRQ */
46 #define ZORRO_PRODID_MED1K2SX 40 /* 1200SX DMA 4 IRQ */
47 #define ZORRO_PRODID_MED1K2LT2 48 /* 1200LTx2 DMA 4 IRQ */
48 #define ZORRO_PRODID_MED1K2LT4 49 /* 1200LTx4 DMA 4 IRQ */
49 #define ZORRO_PRODID_MED1K2TX 60 /* 1200TX DMA 4 IRQ */
50 #define ZORRO_PRODID_MED4KMKII 63 /* 4000 MKII DMA 4 IRQ */
52 #define ZORRO_PRODID_MEDZIV_MEM ZORRO_PRODID_MEDZIV+0x80
53 #define ZORRO_PRODID_MED1K2_MEM ZORRO_PRODID_MED1K2+0x80
54 #define ZORRO_PRODID_MED4K_MEM ZORRO_PRODID_MED4K+0x80
55 #define ZORRO_PRODID_MED1K2SX_MEM ZORRO_PRODID_MED1K2SX+0x80
56 #define ZORRO_PRODID_MED1K2LT2_MEM ZORRO_PRODID_MED1K2LT2+0x80
57 #define ZORRO_PRODID_MED1K2LT4_MEM ZORRO_PRODID_MED1K2LT4+0x80
58 #define ZORRO_PRODID_MED1K2TX_MEM ZORRO_PRODID_MED1K2TX+0x80
59 #define ZORRO_PRODID_MED4KMKII_MEM ZORRO_PRODID_MED4KMKII+0x80
62 * Mediator 1200 consists of two boards. First board lives in Z2 I/O
63 * space and is internally divided into two 64kB spaces. Second board, used
64 * as a window into PCI memory space is configured somewhere within 24-bit Fast
65 * RAM space (its size depends on a WINDOW jumper setting).
67 #define EMPB_SETUP_OFF 0x00000000
68 #define EMPB_SETUP_SIZE 0xFFFF
70 #define EMPB_SETUP_CONFIG_OFF 0x0 /* Config bits */
71 #define EMPB_SETUP_STATUS_OFF 0x4 /* Status bits */
72 #define EMPB_SETUP_WINDOW_OFF 0x2 /* set memory window position */
73 #define EMPB_SETUP_BRIDGE_OFF 0x7 /* select between conf or I/O */
75 #define EMPB_BRIDGE_CONF 0xA0 /* switch into configuration space */
76 #define EMPB_BRIDGE_IO 0x20 /* switch into I/O space */
78 #define EMPB_BRIDGE_OFF 0x00010000
79 #define EMPB_BRIDGE_SIZE 0xFFFF
81 #define EMPB_CONF_DEV_STRIDE 0x800 /* offset between PCI devices */
82 #define EMPB_CONF_FUNC_STRIDE 0x100 /* XXX: offset between PCI funcs */
84 /* All PCI interrupt lines are wired to INT2? */
85 #define EMPB_INT 2 // XXX: wild guess
88 * Mediator 4000 consists of two boards. First board lives in Z3 I/O
89 * space and is internally divided into four 4M spaces. Second board, used
90 * as a window into PCI memory space is configured somewhere within 24-bit Fast
91 * RAM space (its size depends on a WINDOW jumper setting).
93 #define EMZ4_SETUP_OFF 0x00000000
94 #define EMZ4_SETUP_SIZE 0xFFFF
96 #define EMZ4_SETUP_CONFIG_OFF 0x0 /* Config bits */
97 #define EMZ4_SETUP_STATUS_OFF 0x4 /* Status bits */
99 #define EMZ4_IOPORT_OFF 0x00c06000
100 #define EMZ4_IOPORT_SIZE 0x00000FFF
102 #define EMZ4_CONFIG_OFF 0x00800000
103 #define EMZ4_CONFIG_SIZE 0x003FFFFF
105 #define EMZ4_CONF_BUS_STRIDE 0x10000 /* offset between PCI busses */
106 #define EMZ4_CONF_DEV_STRIDE 0x800 /* offset between PCI devices */
107 #define EMZ4_CONF_FUNC_STRIDE 0x100 /* XXX: offset between PCI funcs */
109 #define EMZ4_BUS_MAX 64
111 /* All PCI interrupt lines are wired to INT2? */
112 #define EMZ4_INT 2 // XXX: wild guess
115 #endif /* _AMIGA_EMPBREG_H_ */