25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_uninorth.c,v 1.8 2007/02/16 17:17:51 debug Exp $ |
* $Id: dev_uninorth.c,v 1.9 2007/06/15 19:57:34 debug Exp $ |
29 |
* |
* |
30 |
* Uni-North PCI controller (as used by MacPPC). |
* COMMENT: Uni-North PCI controller (used by MacPPC machines) |
31 |
*/ |
*/ |
32 |
|
|
33 |
#include <stdio.h> |
#include <stdio.h> |
110 |
} |
} |
111 |
|
|
112 |
|
|
|
/* |
|
|
* dev_uninorth_init(): |
|
|
*/ |
|
113 |
struct pci_data *dev_uninorth_init(struct machine *machine, struct memory *mem, |
struct pci_data *dev_uninorth_init(struct machine *machine, struct memory *mem, |
114 |
uint64_t addr, int isa_irqbase, int pciirq) |
uint64_t addr, int isa_irqbase, int pciirq) |
115 |
{ |
{ |
118 |
uint64_t isa_portbase = 0, isa_membase = 0; |
uint64_t isa_portbase = 0, isa_membase = 0; |
119 |
uint64_t pci_portbase = 0, pci_membase = 0; |
uint64_t pci_portbase = 0, pci_membase = 0; |
120 |
|
|
121 |
d = malloc(sizeof(struct uninorth_data)); |
CHECK_ALLOCATION(d = malloc(sizeof(struct uninorth_data))); |
|
if (d == NULL) { |
|
|
fprintf(stderr, "out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
122 |
memset(d, 0, sizeof(struct uninorth_data)); |
memset(d, 0, sizeof(struct uninorth_data)); |
123 |
|
|
124 |
d->pciirq = pciirq; |
d->pciirq = pciirq; |
125 |
|
|
126 |
pci_io_offset = 0x00000000ULL; |
pci_io_offset = 0x00000000ULL; |