25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: pci_vt82c586.c,v 1.12 2005/02/26 18:00:38 debug Exp $ |
* $Id: pci_vt82c586.c,v 1.14 2005/06/21 18:48:08 debug Exp $ |
29 |
* |
* |
30 |
* VIATECH VT82C586 devices: |
* VIATECH VT82C586 devices: |
31 |
* |
* |
39 |
#include <stdlib.h> |
#include <stdlib.h> |
40 |
#include <string.h> |
#include <string.h> |
41 |
|
|
42 |
|
#include "machine.h" |
43 |
#include "memory.h" |
#include "memory.h" |
44 |
#include "misc.h" |
#include "misc.h" |
45 |
#include "devices.h" |
#include "devices.h" |
119 |
void pci_vt82c586_ide_init(struct machine *machine, struct memory *mem) |
void pci_vt82c586_ide_init(struct machine *machine, struct memory *mem) |
120 |
{ |
{ |
121 |
/* |
/* |
122 |
* TODO: what about these base addresses and interrupt |
* TODO: The check for machine type shouldn't be here? |
|
* numbers? They work for Cobalt... 7 = PCI interrupt?? (TODO) |
|
123 |
*/ |
*/ |
124 |
dev_wdc_init(machine, mem, 0x100001f0, 6, 0); /* primary */ |
|
125 |
dev_wdc_init(machine, mem, 0x10000170, 6, 2); /* secondary */ |
switch (machine->machine_type) { |
126 |
|
|
127 |
|
case MACHINE_COBALT: |
128 |
|
/* what about these base addresses and interrupt |
129 |
|
* numbers? They work for Cobalt... |
130 |
|
* 7 = PCI interrupt?? (TODO) |
131 |
|
*/ |
132 |
|
dev_wdc_init(machine, mem, 0x100001f0, 6, 0); /* primary */ |
133 |
|
dev_wdc_init(machine, mem, 0x10000170, 6, 2); /* secondary */ |
134 |
|
break; |
135 |
|
|
136 |
|
case MACHINE_EVBMIPS: |
137 |
|
/* TODO: Irqs... */ |
138 |
|
dev_wdc_init(machine, mem, 0x180001f0, 8+14, 0);/* primary */ |
139 |
|
dev_wdc_init(machine, mem, 0x18000170, 8+15, 2);/* secondary */ |
140 |
|
break; |
141 |
|
|
142 |
|
default:fatal("pci_vt82c586_ide_init(): unimplemented machine type\n"); |
143 |
|
exit(1); |
144 |
|
} |
145 |
} |
} |
146 |
|
|