25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_footbridge.c,v 1.43 2006/03/04 12:38:47 debug Exp $ |
* $Id: dev_footbridge.c,v 1.44 2006/08/11 17:43:30 debug Exp $ |
29 |
* |
* |
30 |
* Footbridge. Used in Netwinder and Cats. |
* Footbridge. Used in Netwinder and Cats. |
31 |
* |
* |
136 |
|
|
137 |
|
|
138 |
/* |
/* |
139 |
|
* Reset pin at ISA port 0x338, at least in the NetWinder: |
140 |
|
* |
141 |
|
* TODO: NOT WORKING YET! |
142 |
|
*/ |
143 |
|
DEVICE_ACCESS(footbridge_reset) |
144 |
|
{ |
145 |
|
uint64_t idata = 0; |
146 |
|
|
147 |
|
if (writeflag == MEM_WRITE) { |
148 |
|
idata = memory_readmax64(cpu, data, len); |
149 |
|
if (idata & 0x40) { |
150 |
|
debug("[ footbridge_reset: GP16: Halting. ]\n"); |
151 |
|
cpu->running = 0; |
152 |
|
exit(1); |
153 |
|
} |
154 |
|
} |
155 |
|
|
156 |
|
return 1; |
157 |
|
} |
158 |
|
|
159 |
|
|
160 |
|
/* |
161 |
* dev_footbridge_pci_access(): |
* dev_footbridge_pci_access(): |
162 |
* |
* |
163 |
* The Footbridge PCI configuration space is implemented as a direct memory |
* The Footbridge PCI configuration space is implemented as a direct memory |
466 |
devinit->machine->memory, 0xc0, 11, 0, "symphony_83c553"); |
devinit->machine->memory, 0xc0, 11, 0, "symphony_83c553"); |
467 |
bus_pci_add(devinit->machine, d->pcibus, |
bus_pci_add(devinit->machine, d->pcibus, |
468 |
devinit->machine->memory, 0xc0, 11, 1, "symphony_82c105"); |
devinit->machine->memory, 0xc0, 11, 1, "symphony_82c105"); |
469 |
|
memory_device_register(devinit->machine->memory, |
470 |
|
"footbridge_reset", 0x7c000338, 1, |
471 |
|
dev_footbridge_reset_access, d, DM_DEFAULT, NULL); |
472 |
break; |
break; |
473 |
default:fatal("footbridge: unimplemented machine type.\n"); |
default:fatal("footbridge: unimplemented machine type.\n"); |
474 |
exit(1); |
exit(1); |