blob: 4299052c5e6515f269b8fcf93c8eb5cef81919c7 [file] [log] [blame]
pbrook502a5392006-05-13 16:11:23 +00001/*
2 * QEMU Uninorth PCI host (for all Mac99 and newer machines)
3 *
4 * Copyright (c) 2006 Fabrice Bellard
ths5fafdf22007-09-16 21:08:06 +00005 *
pbrook502a5392006-05-13 16:11:23 +00006 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
pbrook87ecb682007-11-17 17:14:51 +000024#include "hw.h"
25#include "ppc_mac.h"
26#include "pci.h"
Isaku Yamahata4f5e19e2009-10-30 21:21:06 +090027#include "pci_host.h"
pbrook87ecb682007-11-17 17:14:51 +000028
blueswir1f3902382009-02-05 20:22:07 +000029/* debug UniNorth */
30//#define DEBUG_UNIN
31
32#ifdef DEBUG_UNIN
Blue Swirl001faf32009-05-13 17:53:17 +000033#define UNIN_DPRINTF(fmt, ...) \
34 do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
blueswir1f3902382009-02-05 20:22:07 +000035#else
Blue Swirl001faf32009-05-13 17:53:17 +000036#define UNIN_DPRINTF(fmt, ...)
blueswir1f3902382009-02-05 20:22:07 +000037#endif
38
Alexander Graffa0be692010-02-09 17:37:04 +010039static const int unin_irq_line[] = { 0x1b, 0x1c, 0x1d, 0x1e };
40
Blue Swirl2e29bd02009-07-31 20:23:28 +000041typedef struct UNINState {
42 SysBusDevice busdev;
43 PCIHostState host_state;
Blue Swirl46f30692011-09-17 20:30:50 +000044 MemoryRegion pci_mmio;
45 MemoryRegion pci_hole;
Blue Swirl2e29bd02009-07-31 20:23:28 +000046} UNINState;
pbrook502a5392006-05-13 16:11:23 +000047
pbrookd2b59312006-09-24 00:16:34 +000048static int pci_unin_map_irq(PCIDevice *pci_dev, int irq_num)
pbrook502a5392006-05-13 16:11:23 +000049{
Alexander Graffa0be692010-02-09 17:37:04 +010050 int retval;
51 int devfn = pci_dev->devfn & 0x00FFFFFF;
52
53 retval = (((devfn >> 11) & 0x1F) + irq_num) & 3;
54
55 return retval;
pbrookd2b59312006-09-24 00:16:34 +000056}
57
Juan Quintela5d4e84c2009-08-28 15:28:17 +020058static void pci_unin_set_irq(void *opaque, int irq_num, int level)
pbrookd2b59312006-09-24 00:16:34 +000059{
Juan Quintela5d4e84c2009-08-28 15:28:17 +020060 qemu_irq *pic = opaque;
61
Alexander Graffa0be692010-02-09 17:37:04 +010062 UNIN_DPRINTF("%s: setting INT %d = %d\n", __func__,
63 unin_irq_line[irq_num], level);
64 qemu_set_irq(pic[unin_irq_line[irq_num]], level);
pbrook502a5392006-05-13 16:11:23 +000065}
66
blueswir1f3902382009-02-05 20:22:07 +000067static void pci_unin_reset(void *opaque)
68{
69}
70
Alexander Grafd86f0e32010-02-09 17:37:01 +010071static uint32_t unin_get_config_reg(uint32_t reg, uint32_t addr)
72{
73 uint32_t retval;
74
75 if (reg & (1u << 31)) {
76 /* XXX OpenBIOS compatibility hack */
77 retval = reg | (addr & 3);
78 } else if (reg & 1) {
79 /* CFA1 style */
80 retval = (reg & ~7u) | (addr & 7);
81 } else {
82 uint32_t slot, func;
83
84 /* Grab CFA0 style values */
85 slot = ffs(reg & 0xfffff800) - 1;
86 func = (reg >> 8) & 7;
87
88 /* ... and then convert them to x86 format */
89 /* config pointer */
90 retval = (reg & (0xff - 7)) | (addr & 7);
91 /* slot */
92 retval |= slot << 11;
93 /* fn */
94 retval |= func << 8;
95 }
96
97
98 UNIN_DPRINTF("Converted config space accessor %08x/%08x -> %08x\n",
99 reg, addr, retval);
100
101 return retval;
102}
103
Avi Kivityd0ed8072011-07-24 17:47:18 +0300104static void unin_data_write(void *opaque, target_phys_addr_t addr,
105 uint64_t val, unsigned len)
Alexander Grafd86f0e32010-02-09 17:37:01 +0100106{
Avi Kivityd0ed8072011-07-24 17:47:18 +0300107 UNINState *s = opaque;
108 UNIN_DPRINTF("write addr %" TARGET_FMT_plx " len %d val %"PRIx64"\n",
109 addr, len, val);
Alexander Grafd86f0e32010-02-09 17:37:01 +0100110 pci_data_write(s->host_state.bus,
111 unin_get_config_reg(s->host_state.config_reg, addr),
112 val, len);
113}
114
Avi Kivityd0ed8072011-07-24 17:47:18 +0300115static uint64_t unin_data_read(void *opaque, target_phys_addr_t addr,
116 unsigned len)
Alexander Grafd86f0e32010-02-09 17:37:01 +0100117{
Avi Kivityd0ed8072011-07-24 17:47:18 +0300118 UNINState *s = opaque;
Alexander Grafd86f0e32010-02-09 17:37:01 +0100119 uint32_t val;
120
121 val = pci_data_read(s->host_state.bus,
122 unin_get_config_reg(s->host_state.config_reg, addr),
123 len);
Avi Kivityd0ed8072011-07-24 17:47:18 +0300124 UNIN_DPRINTF("read addr %" TARGET_FMT_plx " len %d val %x\n",
125 addr, len, val);
Alexander Grafd86f0e32010-02-09 17:37:01 +0100126 return val;
127}
128
Avi Kivityd0ed8072011-07-24 17:47:18 +0300129static const MemoryRegionOps unin_data_ops = {
130 .read = unin_data_read,
131 .write = unin_data_write,
132 .endianness = DEVICE_LITTLE_ENDIAN,
133};
134
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200135static int pci_unin_main_init_device(SysBusDevice *dev)
pbrook502a5392006-05-13 16:11:23 +0000136{
137 UNINState *s;
pbrook502a5392006-05-13 16:11:23 +0000138
139 /* Use values found on a real PowerMac */
140 /* Uninorth main bus */
Blue Swirl2e29bd02009-07-31 20:23:28 +0000141 s = FROM_SYSBUS(UNINState, dev);
pbrook502a5392006-05-13 16:11:23 +0000142
Avi Kivityd0ed8072011-07-24 17:47:18 +0300143 memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops,
144 &s->host_state, "pci-conf-idx", 0x1000);
145 memory_region_init_io(&s->host_state.data_mem, &unin_data_ops, s,
146 "pci-conf-data", 0x1000);
147 sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
148 sysbus_init_mmio_region(dev, &s->host_state.data_mem);
Blue Swirl2e29bd02009-07-31 20:23:28 +0000149
Blue Swirl2e29bd02009-07-31 20:23:28 +0000150 qemu_register_reset(pci_unin_reset, &s->host_state);
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200151 return 0;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000152}
153
Avi Kivityd0ed8072011-07-24 17:47:18 +0300154
Alexander Graf0f921192010-02-09 17:37:02 +0100155static int pci_u3_agp_init_device(SysBusDevice *dev)
156{
157 UNINState *s;
Alexander Graf0f921192010-02-09 17:37:02 +0100158
159 /* Uninorth U3 AGP bus */
160 s = FROM_SYSBUS(UNINState, dev);
161
Avi Kivityd0ed8072011-07-24 17:47:18 +0300162 memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops,
163 &s->host_state, "pci-conf-idx", 0x1000);
164 memory_region_init_io(&s->host_state.data_mem, &unin_data_ops, s,
165 "pci-conf-data", 0x1000);
166 sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
167 sysbus_init_mmio_region(dev, &s->host_state.data_mem);
Alexander Graf0f921192010-02-09 17:37:02 +0100168
Alexander Graf0f921192010-02-09 17:37:02 +0100169 qemu_register_reset(pci_unin_reset, &s->host_state);
170
171 return 0;
172}
173
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200174static int pci_unin_agp_init_device(SysBusDevice *dev)
Blue Swirl2e29bd02009-07-31 20:23:28 +0000175{
176 UNINState *s;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000177
178 /* Uninorth AGP bus */
179 s = FROM_SYSBUS(UNINState, dev);
180
Avi Kivityd0ed8072011-07-24 17:47:18 +0300181 memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops,
182 &s->host_state, "pci-conf-idx", 0x1000);
183 memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
184 &s->host_state, "pci-conf-data", 0x1000);
185 sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
186 sysbus_init_mmio_region(dev, &s->host_state.data_mem);
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200187 return 0;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000188}
189
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200190static int pci_unin_internal_init_device(SysBusDevice *dev)
Blue Swirl2e29bd02009-07-31 20:23:28 +0000191{
192 UNINState *s;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000193
194 /* Uninorth internal bus */
195 s = FROM_SYSBUS(UNINState, dev);
196
Avi Kivityd0ed8072011-07-24 17:47:18 +0300197 memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops,
198 &s->host_state, "pci-conf-idx", 0x1000);
199 memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
200 &s->host_state, "pci-conf-data", 0x1000);
201 sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
202 sysbus_init_mmio_region(dev, &s->host_state.data_mem);
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200203 return 0;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000204}
205
Avi Kivityaee97b82011-08-08 16:09:04 +0300206PCIBus *pci_pmac_init(qemu_irq *pic,
207 MemoryRegion *address_space_mem,
208 MemoryRegion *address_space_io)
Blue Swirl2e29bd02009-07-31 20:23:28 +0000209{
210 DeviceState *dev;
211 SysBusDevice *s;
212 UNINState *d;
213
214 /* Use values found on a real PowerMac */
215 /* Uninorth main bus */
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100216 dev = qdev_create(NULL, "uni-north");
Markus Armbrustere23a1b32009-10-07 01:15:58 +0200217 qdev_init_nofail(dev);
Blue Swirl2e29bd02009-07-31 20:23:28 +0000218 s = sysbus_from_qdev(dev);
219 d = FROM_SYSBUS(UNINState, s);
Blue Swirl46f30692011-09-17 20:30:50 +0000220 memory_region_init(&d->pci_mmio, "pci-mmio", 0x100000000ULL);
221 memory_region_init_alias(&d->pci_hole, "pci-hole", &d->pci_mmio,
222 0x80000000ULL, 0x70000000ULL);
223 memory_region_add_subregion(address_space_mem, 0x80000000ULL,
224 &d->pci_hole);
225
Blue Swirlcdd09352009-09-19 17:59:10 +0000226 d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci",
Blue Swirl2e29bd02009-07-31 20:23:28 +0000227 pci_unin_set_irq, pci_unin_map_irq,
Avi Kivityaee97b82011-08-08 16:09:04 +0300228 pic,
Blue Swirl46f30692011-09-17 20:30:50 +0000229 &d->pci_mmio,
Avi Kivityaee97b82011-08-08 16:09:04 +0300230 address_space_io,
Avi Kivity1e391012011-07-26 14:26:19 +0300231 PCI_DEVFN(11, 0), 4);
Blue Swirl2e29bd02009-07-31 20:23:28 +0000232
Blue Swirl60398742009-11-15 14:30:56 +0000233#if 0
Isaku Yamahata520128b2010-06-23 16:15:25 +0900234 pci_create_simple(d->host_state.bus, PCI_DEVFN(11, 0), "uni-north");
Blue Swirl60398742009-11-15 14:30:56 +0000235#endif
Blue Swirl2e29bd02009-07-31 20:23:28 +0000236
237 sysbus_mmio_map(s, 0, 0xf2800000);
238 sysbus_mmio_map(s, 1, 0xf2c00000);
239
240 /* DEC 21154 bridge */
241#if 0
242 /* XXX: not activated as PPC BIOS doesn't handle multiple buses properly */
Isaku Yamahata520128b2010-06-23 16:15:25 +0900243 pci_create_simple(d->host_state.bus, PCI_DEVFN(12, 0), "dec-21154");
Blue Swirl2e29bd02009-07-31 20:23:28 +0000244#endif
245
246 /* Uninorth AGP bus */
Isaku Yamahata520128b2010-06-23 16:15:25 +0900247 pci_create_simple(d->host_state.bus, PCI_DEVFN(11, 0), "uni-north-agp");
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100248 dev = qdev_create(NULL, "uni-north-agp");
Blue Swirld27d06f2009-11-15 17:42:17 +0000249 qdev_init_nofail(dev);
250 s = sysbus_from_qdev(dev);
251 sysbus_mmio_map(s, 0, 0xf0800000);
252 sysbus_mmio_map(s, 1, 0xf0c00000);
Blue Swirl2e29bd02009-07-31 20:23:28 +0000253
254 /* Uninorth internal bus */
255#if 0
256 /* XXX: not needed for now */
Isaku Yamahata520128b2010-06-23 16:15:25 +0900257 pci_create_simple(d->host_state.bus, PCI_DEVFN(14, 0), "uni-north-pci");
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100258 dev = qdev_create(NULL, "uni-north-pci");
Blue Swirld27d06f2009-11-15 17:42:17 +0000259 qdev_init_nofail(dev);
260 s = sysbus_from_qdev(dev);
261 sysbus_mmio_map(s, 0, 0xf4800000);
262 sysbus_mmio_map(s, 1, 0xf4c00000);
Blue Swirl2e29bd02009-07-31 20:23:28 +0000263#endif
264
265 return d->host_state.bus;
266}
267
Avi Kivityaee97b82011-08-08 16:09:04 +0300268PCIBus *pci_pmac_u3_init(qemu_irq *pic,
269 MemoryRegion *address_space_mem,
270 MemoryRegion *address_space_io)
Alexander Graf0f921192010-02-09 17:37:02 +0100271{
272 DeviceState *dev;
273 SysBusDevice *s;
274 UNINState *d;
275
276 /* Uninorth AGP bus */
277
278 dev = qdev_create(NULL, "u3-agp");
279 qdev_init_nofail(dev);
280 s = sysbus_from_qdev(dev);
281 d = FROM_SYSBUS(UNINState, s);
282
Blue Swirl46f30692011-09-17 20:30:50 +0000283 memory_region_init(&d->pci_mmio, "pci-mmio", 0x100000000ULL);
284 memory_region_init_alias(&d->pci_hole, "pci-hole", &d->pci_mmio,
285 0x80000000ULL, 0x70000000ULL);
286 memory_region_add_subregion(address_space_mem, 0x80000000ULL,
287 &d->pci_hole);
288
Alexander Graf0f921192010-02-09 17:37:02 +0100289 d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci",
290 pci_unin_set_irq, pci_unin_map_irq,
Avi Kivityaee97b82011-08-08 16:09:04 +0300291 pic,
Blue Swirl46f30692011-09-17 20:30:50 +0000292 &d->pci_mmio,
Avi Kivityaee97b82011-08-08 16:09:04 +0300293 address_space_io,
Avi Kivity1e391012011-07-26 14:26:19 +0300294 PCI_DEVFN(11, 0), 4);
Alexander Graf0f921192010-02-09 17:37:02 +0100295
296 sysbus_mmio_map(s, 0, 0xf0800000);
297 sysbus_mmio_map(s, 1, 0xf0c00000);
298
299 pci_create_simple(d->host_state.bus, 11 << 3, "u3-agp");
300
301 return d->host_state.bus;
302}
303
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200304static int unin_main_pci_host_init(PCIDevice *d)
Blue Swirl2e29bd02009-07-31 20:23:28 +0000305{
pbrook502a5392006-05-13 16:11:23 +0000306 d->config[0x0C] = 0x08; // cache_line_size
307 d->config[0x0D] = 0x10; // latency_timer
pbrook502a5392006-05-13 16:11:23 +0000308 d->config[0x34] = 0x00; // capabilities_pointer
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200309 return 0;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000310}
pbrook502a5392006-05-13 16:11:23 +0000311
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200312static int unin_agp_pci_host_init(PCIDevice *d)
Blue Swirl2e29bd02009-07-31 20:23:28 +0000313{
pbrook502a5392006-05-13 16:11:23 +0000314 d->config[0x0C] = 0x08; // cache_line_size
315 d->config[0x0D] = 0x10; // latency_timer
pbrook502a5392006-05-13 16:11:23 +0000316 // d->config[0x34] = 0x80; // capabilities_pointer
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200317 return 0;
Blue Swirl2e29bd02009-07-31 20:23:28 +0000318}
pbrook502a5392006-05-13 16:11:23 +0000319
Alexander Graf0f921192010-02-09 17:37:02 +0100320static int u3_agp_pci_host_init(PCIDevice *d)
321{
Alexander Graf0f921192010-02-09 17:37:02 +0100322 /* cache line size */
323 d->config[0x0C] = 0x08;
324 /* latency timer */
325 d->config[0x0D] = 0x10;
Alexander Graf0f921192010-02-09 17:37:02 +0100326 return 0;
327}
328
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200329static int unin_internal_pci_host_init(PCIDevice *d)
Blue Swirl2e29bd02009-07-31 20:23:28 +0000330{
pbrook502a5392006-05-13 16:11:23 +0000331 d->config[0x0C] = 0x08; // cache_line_size
332 d->config[0x0D] = 0x10; // latency_timer
pbrook502a5392006-05-13 16:11:23 +0000333 d->config[0x34] = 0x00; // capabilities_pointer
Gerd Hoffmann81a322d2009-08-14 10:36:05 +0200334 return 0;
pbrook502a5392006-05-13 16:11:23 +0000335}
Blue Swirl2e29bd02009-07-31 20:23:28 +0000336
337static PCIDeviceInfo unin_main_pci_host_info = {
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100338 .qdev.name = "uni-north",
Blue Swirl2e29bd02009-07-31 20:23:28 +0000339 .qdev.size = sizeof(PCIDevice),
340 .init = unin_main_pci_host_init,
Isaku Yamahatad7b61ec2011-05-25 10:58:28 +0900341 .vendor_id = PCI_VENDOR_ID_APPLE,
342 .device_id = PCI_DEVICE_ID_APPLE_UNI_N_PCI,
343 .revision = 0x00,
344 .class_id = PCI_CLASS_BRIDGE_HOST,
Blue Swirl2e29bd02009-07-31 20:23:28 +0000345};
346
Alexander Graf0f921192010-02-09 17:37:02 +0100347static PCIDeviceInfo u3_agp_pci_host_info = {
348 .qdev.name = "u3-agp",
349 .qdev.size = sizeof(PCIDevice),
350 .init = u3_agp_pci_host_init,
Isaku Yamahatad7b61ec2011-05-25 10:58:28 +0900351 .vendor_id = PCI_VENDOR_ID_APPLE,
352 .device_id = PCI_DEVICE_ID_APPLE_U3_AGP,
353 .revision = 0x00,
354 .class_id = PCI_CLASS_BRIDGE_HOST,
Alexander Graf0f921192010-02-09 17:37:02 +0100355};
356
Blue Swirl2e29bd02009-07-31 20:23:28 +0000357static PCIDeviceInfo unin_agp_pci_host_info = {
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100358 .qdev.name = "uni-north-agp",
Blue Swirl2e29bd02009-07-31 20:23:28 +0000359 .qdev.size = sizeof(PCIDevice),
360 .init = unin_agp_pci_host_init,
Isaku Yamahatad7b61ec2011-05-25 10:58:28 +0900361 .vendor_id = PCI_VENDOR_ID_APPLE,
362 .device_id = PCI_DEVICE_ID_APPLE_UNI_N_AGP,
363 .revision = 0x00,
364 .class_id = PCI_CLASS_BRIDGE_HOST,
Blue Swirl2e29bd02009-07-31 20:23:28 +0000365};
366
367static PCIDeviceInfo unin_internal_pci_host_info = {
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100368 .qdev.name = "uni-north-pci",
Blue Swirl2e29bd02009-07-31 20:23:28 +0000369 .qdev.size = sizeof(PCIDevice),
370 .init = unin_internal_pci_host_init,
Isaku Yamahatad7b61ec2011-05-25 10:58:28 +0900371 .vendor_id = PCI_VENDOR_ID_APPLE,
372 .device_id = PCI_DEVICE_ID_APPLE_UNI_N_I_PCI,
373 .revision = 0x00,
374 .class_id = PCI_CLASS_BRIDGE_HOST,
Blue Swirl2e29bd02009-07-31 20:23:28 +0000375};
376
377static void unin_register_devices(void)
378{
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100379 sysbus_register_dev("uni-north", sizeof(UNINState),
Blue Swirl2e29bd02009-07-31 20:23:28 +0000380 pci_unin_main_init_device);
381 pci_qdev_register(&unin_main_pci_host_info);
Alexander Graf0f921192010-02-09 17:37:02 +0100382 sysbus_register_dev("u3-agp", sizeof(UNINState),
383 pci_u3_agp_init_device);
384 pci_qdev_register(&u3_agp_pci_host_info);
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100385 sysbus_register_dev("uni-north-agp", sizeof(UNINState),
Blue Swirl2e29bd02009-07-31 20:23:28 +0000386 pci_unin_agp_init_device);
387 pci_qdev_register(&unin_agp_pci_host_info);
Markus Armbruster18dd19a2009-12-14 10:41:21 +0100388 sysbus_register_dev("uni-north-pci", sizeof(UNINState),
Blue Swirl2e29bd02009-07-31 20:23:28 +0000389 pci_unin_internal_init_device);
390 pci_qdev_register(&unin_internal_pci_host_info);
391}
392
393device_init(unin_register_devices)