1 |
/* |
/* |
2 |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-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_prep.c,v 1.4 2006/02/09 20:02:59 debug Exp $ |
* $Id: dev_prep.c,v 1.10 2007/02/11 10:03:55 debug Exp $ |
29 |
* |
* |
30 |
* PReP interrupt controller. |
* PReP mainbus. |
31 |
|
* |
32 |
|
* o) ISA bus |
33 |
|
* o) Interrupt controller |
34 |
*/ |
*/ |
35 |
|
|
36 |
#include <stdio.h> |
#include <stdio.h> |
37 |
#include <stdlib.h> |
#include <stdlib.h> |
38 |
#include <string.h> |
#include <string.h> |
39 |
|
|
40 |
|
#include "bus_isa.h" |
41 |
#include "cpu.h" |
#include "cpu.h" |
42 |
#include "device.h" |
#include "device.h" |
|
#include "devices.h" |
|
43 |
#include "machine.h" |
#include "machine.h" |
44 |
#include "memory.h" |
#include "memory.h" |
45 |
#include "misc.h" |
#include "misc.h" |
46 |
|
|
47 |
|
|
48 |
/* |
struct prep_data { |
49 |
* dev_prep_access(): |
uint32_t int_status; |
50 |
*/ |
}; |
51 |
|
|
52 |
|
|
53 |
DEVICE_ACCESS(prep) |
DEVICE_ACCESS(prep) |
54 |
{ |
{ |
55 |
/* struct prep_data *d = extra; */ |
/* struct prep_data *d = extra; */ |
85 |
memory_device_register(devinit->machine->memory, devinit->name, |
memory_device_register(devinit->machine->memory, devinit->name, |
86 |
0xbffff000, 0x1000, dev_prep_access, d, DM_DEFAULT, NULL); |
0xbffff000, 0x1000, dev_prep_access, d, DM_DEFAULT, NULL); |
87 |
|
|
88 |
devinit->return_ptr = d; |
/* This works for at least the IBM 6050: */ |
89 |
|
bus_isa_init(devinit->machine, devinit->interrupt_path, |
90 |
|
BUS_ISA_IDE0 | BUS_ISA_IDE1, 0x80000000, 0xc0000000); |
91 |
|
|
92 |
return 1; |
return 1; |
93 |
} |
} |