25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_pcic.c,v 1.10 2005/04/06 23:13:36 debug Exp $ |
* $Id: dev_pcic.c,v 1.12 2005/09/11 10:37:38 debug Exp $ |
29 |
* |
* |
30 |
* Intel 82365SL PC Card Interface Controller (called "pcic" by NetBSD). |
* Intel 82365SL PC Card Interface Controller (called "pcic" by NetBSD). |
31 |
* |
* |
32 |
* TODO: Lots of stuff. |
* TODO: Lots of stuff. This is just a quick hack. Don't rely on it. |
33 |
*/ |
*/ |
34 |
|
|
35 |
#include <stdio.h> |
#include <stdio.h> |
38 |
|
|
39 |
#include "cpu.h" |
#include "cpu.h" |
40 |
#include "device.h" |
#include "device.h" |
|
#include "devices.h" |
|
41 |
#include "emul.h" |
#include "emul.h" |
42 |
#include "machine.h" |
#include "machine.h" |
43 |
#include "memory.h" |
#include "memory.h" |
131 |
if (relative_addr < sizeof(x)) |
if (relative_addr < sizeof(x)) |
132 |
odata = x[relative_addr]; |
odata = x[relative_addr]; |
133 |
|
|
134 |
debug("[ dev_pcic_cis_access: blah blah ]\n"); |
debug("[ dev_pcic_cis_access: blah blah: addr=0x%x ]\n", |
135 |
|
(int)relative_addr); |
136 |
} |
} |
137 |
|
|
138 |
if (writeflag == MEM_READ) |
if (writeflag == MEM_READ) |
185 |
odata = PCIC_CSC_GPI; |
odata = PCIC_CSC_GPI; |
186 |
break; |
break; |
187 |
case PCIC_IF_STATUS: |
case PCIC_IF_STATUS: |
188 |
odata = PCIC_IF_STATUS_READY; |
odata = PCIC_IF_STATUS_READY |
189 |
|
| PCIC_IF_STATUS_POWERACTIVE; |
190 |
if (controller_nr == 0 && socket_nr == 0) |
if (controller_nr == 0 && socket_nr == 0) |
191 |
odata |= PCIC_IF_STATUS_CARDDETECT_PRESENT; |
odata |= PCIC_IF_STATUS_CARDDETECT_PRESENT; |
192 |
break; |
break; |
237 |
MEM_DEFAULT, NULL); |
MEM_DEFAULT, NULL); |
238 |
|
|
239 |
/* TODO: find out a good way to specify the address, and the IRQ! */ |
/* TODO: find out a good way to specify the address, and the IRQ! */ |
240 |
dev_wdc_init(devinit->machine, devinit->machine->memory, |
/* IRQ 8 + 32 + 9 */ |
241 |
0x14000180, 8 + 32 + 9, 0); |
device_add(devinit->machine, "wdc addr=0x14000180 irq=49"); |
242 |
|
|
243 |
/* TODO: Linux/MobilePro looks at 0x14000170 and 0x1f0... */ |
/* TODO: Linux/MobilePro looks at 0x14000170 and 0x1f0... */ |
244 |
/* Yuck. Now there are two. How should this be solved nicely? */ |
/* Yuck. Now there are two. How should this be solved nicely? */ |
245 |
dev_wdc_init(devinit->machine, devinit->machine->memory, |
device_add(devinit->machine, "wdc addr=0x140001f0 irq=49"); |
|
0x140001f0, 8 + 32 + 9, 0); |
|
246 |
|
|
247 |
return 1; |
return 1; |
248 |
} |
} |