/[gxemul]/trunk/src/devices/bus_isa.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/bus_isa.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: bus_isa.c,v 1.16 2007/02/17 06:32:06 debug Exp $   *  $Id: bus_isa.c,v 1.19 2007/06/15 18:44:18 debug Exp $
29   *     *  
30   *  Generic ISA bus. This is not a normal device, but it can be used as a quick   *  COMMENT: Generic ISA bus framework
31   *  way of adding most of the common legacy ISA devices to a machine.   *
32     *  This is not a normal device, but it can be used as a quick way of adding
33     *  most of the common legacy ISA devices to a machine.
34   */   */
35    
36  #include <stdio.h>  #include <stdio.h>
# Line 175  struct bus_isa_data *bus_isa_init(struct Line 177  struct bus_isa_data *bus_isa_init(struct
177          char *interrupt_base_path, uint32_t bus_isa_flags,          char *interrupt_base_path, uint32_t bus_isa_flags,
178          uint64_t isa_portbase, uint64_t isa_membase)          uint64_t isa_portbase, uint64_t isa_membase)
179  {  {
180          struct bus_isa_data *d = malloc(sizeof(struct bus_isa_data));          struct bus_isa_data *d;
181          char tmpstr[300], tmpstr2[300];          char tmpstr[300], tmpstr2[300];
182          int wdc0_irq = 14, wdc1_irq = 15;          int wdc0_irq = 14, wdc1_irq = 15;
183          int i, tmp_handle, kbd_in_use;          int i, tmp_handle, kbd_in_use;
184          int lptbase = 0x378;          int lptbase = 0x378;
185    
186            CHECK_ALLOCATION(d = malloc(sizeof(struct bus_isa_data)));
187          memset(d, 0, sizeof(struct bus_isa_data));          memset(d, 0, sizeof(struct bus_isa_data));
188    
189          d->isa_portbase = isa_portbase;          d->isa_portbase = isa_portbase;
# Line 208  struct bus_isa_data *bus_isa_init(struct Line 211  struct bus_isa_data *bus_isa_init(struct
211          }          }
212    
213          kbd_in_use = ((bus_isa_flags & BUS_ISA_PCKBC_FORCE_USE) ||          kbd_in_use = ((bus_isa_flags & BUS_ISA_PCKBC_FORCE_USE) ||
214              (machine->use_x11))? 1 : 0;              (machine->x11_md.in_use))? 1 : 0;
215    
216          if (machine->machine_type == MACHINE_PREP) {          if (machine->machine_type == MACHINE_PREP) {
217                  /*  PReP with obio controller has both WDCs on irq 13!  */                  /*  PReP with obio controller has both WDCs on irq 13!  */
# Line 295  struct bus_isa_data *bus_isa_init(struct Line 298  struct bus_isa_data *bus_isa_init(struct
298          }          }
299    
300          if (bus_isa_flags & BUS_ISA_VGA) {          if (bus_isa_flags & BUS_ISA_VGA) {
301                  if (machine->use_x11 || bus_isa_flags & BUS_ISA_VGA_FORCE)                  if (machine->x11_md.in_use || bus_isa_flags & BUS_ISA_VGA_FORCE)
302                          dev_vga_init(machine, machine->memory,                          dev_vga_init(machine, machine->memory,
303                              isa_membase + 0xa0000, isa_portbase + 0x3c0,                              isa_membase + 0xa0000, isa_portbase + 0x3c0,
304                              machine->machine_name);                              machine->machine_name);

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26