1 |
/* |
/* |
2 |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2007 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_uninorth.c,v 1.4 2006/01/01 13:17:18 debug Exp $ |
* $Id: dev_uninorth.c,v 1.8 2007/02/16 17:17:51 debug Exp $ |
29 |
* |
* |
30 |
* Uni-North PCI controller (as used by MacPPC). |
* Uni-North PCI controller (as used by MacPPC). |
31 |
*/ |
*/ |
50 |
}; |
}; |
51 |
|
|
52 |
|
|
|
/* |
|
|
* dev_uninorth_addr_access(): |
|
|
*/ |
|
53 |
DEVICE_ACCESS(uninorth_addr) |
DEVICE_ACCESS(uninorth_addr) |
54 |
{ |
{ |
55 |
struct uninorth_data *d = extra; |
struct uninorth_data *d = extra; |
92 |
} |
} |
93 |
|
|
94 |
|
|
|
/* |
|
|
* dev_uninorth_data_access(): |
|
|
*/ |
|
95 |
DEVICE_ACCESS(uninorth_data) |
DEVICE_ACCESS(uninorth_data) |
96 |
{ |
{ |
97 |
struct uninorth_data *d = extra; |
struct uninorth_data *d = extra; |
117 |
uint64_t addr, int isa_irqbase, int pciirq) |
uint64_t addr, int isa_irqbase, int pciirq) |
118 |
{ |
{ |
119 |
struct uninorth_data *d; |
struct uninorth_data *d; |
|
int pci_irqbase = 0; /* TODO */ |
|
120 |
uint64_t pci_io_offset, pci_mem_offset; |
uint64_t pci_io_offset, pci_mem_offset; |
121 |
uint64_t isa_portbase = 0, isa_membase = 0; |
uint64_t isa_portbase = 0, isa_membase = 0; |
122 |
uint64_t pci_portbase = 0, pci_membase = 0; |
uint64_t pci_portbase = 0, pci_membase = 0; |
137 |
isa_membase = 0xd3000000ULL; |
isa_membase = 0xd3000000ULL; |
138 |
|
|
139 |
/* Create a PCI bus: */ |
/* Create a PCI bus: */ |
140 |
d->pci_data = bus_pci_init(machine, pciirq, |
d->pci_data = bus_pci_init(machine, "ZZZ_irq_stuff", |
141 |
pci_io_offset, pci_mem_offset, |
pci_io_offset, pci_mem_offset, |
142 |
pci_portbase, pci_membase, pci_irqbase, |
pci_portbase, pci_membase, "XXX_pci_irqbase", |
143 |
isa_portbase, isa_membase, isa_irqbase); |
isa_portbase, isa_membase, "YYY_isa_irqbase"); |
144 |
|
|
145 |
/* Add the PCI glue for the controller itself: */ |
/* Add the PCI glue for the controller itself: */ |
146 |
bus_pci_add(machine, d->pci_data, mem, 0, 11, 0, "uninorth"); |
bus_pci_add(machine, d->pci_data, mem, 0, 11, 0, "uninorth"); |