1 |
/* |
/* |
2 |
* Copyright (C) 2003-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2003-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_rd94.c,v 1.36 2006/07/23 14:37:34 debug Exp $ |
* $Id: dev_rd94.c,v 1.39 2007/01/28 14:15:30 debug Exp $ |
29 |
* |
* |
30 |
* Used by NEC-RD94, -R94, and -R96. |
* Used by NEC-RD94, -R94, and -R96. |
31 |
*/ |
*/ |
70 |
d->interval --; |
d->interval --; |
71 |
if (d->interval <= 0) { |
if (d->interval <= 0) { |
72 |
debug("[ rd94: interval timer interrupt ]\n"); |
debug("[ rd94: interval timer interrupt ]\n"); |
73 |
cpu_interrupt(cpu, 5); |
|
74 |
|
fatal("TODO: rd94 legacy interrupt rewrite\n"); |
75 |
|
abort(); |
76 |
|
// cpu_interrupt(cpu, 5); |
77 |
} |
} |
78 |
} |
} |
79 |
} |
} |
115 |
odata = 0; |
odata = 0; |
116 |
} |
} |
117 |
debug("[ rd94: intstat1 ]\n"); |
debug("[ rd94: intstat1 ]\n"); |
118 |
|
|
119 |
|
fatal("TODO: rd94 legacy interrupt rewrite\n"); |
120 |
|
abort(); |
121 |
/* cpu_interrupt_ack(cpu, 3); */ |
/* cpu_interrupt_ack(cpu, 3); */ |
122 |
break; |
break; |
123 |
|
|
127 |
odata = 0; /* TODO */ |
odata = 0; /* TODO */ |
128 |
} |
} |
129 |
debug("[ rd94: intstat2 ]\n"); |
debug("[ rd94: intstat2 ]\n"); |
130 |
|
|
131 |
|
fatal("TODO: rd94 legacy interrupt rewrite\n"); |
132 |
|
abort(); |
133 |
/* cpu_interrupt_ack(cpu, 4); */ |
/* cpu_interrupt_ack(cpu, 4); */ |
134 |
break; |
break; |
135 |
|
|
139 |
odata = 0; /* return value does not matter? */ |
odata = 0; /* return value does not matter? */ |
140 |
} |
} |
141 |
debug("[ rd94: intstat3 ]\n"); |
debug("[ rd94: intstat3 ]\n"); |
142 |
cpu_interrupt_ack(cpu, 5); |
|
143 |
|
fatal("TODO: rd94 legacy interrupt rewrite\n"); |
144 |
|
abort(); |
145 |
|
// cpu_interrupt_ack(cpu, 5); |
146 |
d->interval = d->interval_start; |
d->interval = d->interval_start; |
147 |
break; |
break; |
148 |
|
|
152 |
odata = 0; /* return value does not matter? */ |
odata = 0; /* return value does not matter? */ |
153 |
} |
} |
154 |
fatal("[ rd94: intstat4 ]\n"); |
fatal("[ rd94: intstat4 ]\n"); |
155 |
cpu_interrupt_ack(cpu, 6); |
fatal("TODO: rd94 legacy interrupt rewrite\n"); |
156 |
|
abort(); |
157 |
|
// cpu_interrupt_ack(cpu, 6); |
158 |
break; |
break; |
159 |
|
|
160 |
case RD94_SYS_CPUID: |
case RD94_SYS_CPUID: |
222 |
} |
} |
223 |
memset(d, 0, sizeof(struct rd94_data)); |
memset(d, 0, sizeof(struct rd94_data)); |
224 |
d->pciirq = devinit->irq_nr; |
d->pciirq = devinit->irq_nr; |
225 |
d->pci_data = bus_pci_init(devinit->machine, d->pciirq, |
d->pci_data = bus_pci_init(devinit->machine, "TODO irq", |
226 |
0,0, 0,0,0, 0,0,0); |
0,0, 0,0,0, 0,0,0); |
227 |
|
|
228 |
memory_device_register(devinit->machine->memory, devinit->name, |
memory_device_register(devinit->machine->memory, devinit->name, |