/[gxemul]/trunk/src/devices/dev_sgi_ip32.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/dev_sgi_ip32.c

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

revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_sgi_ip32.c,v 1.34 2005/10/27 14:01:14 debug Exp $   *  $Id: dev_sgi_ip32.c,v 1.38 2005/11/21 09:17:27 debug Exp $
29   *     *  
30   *  SGI IP32 devices.   *  SGI IP32 devices.
31   *   *
# Line 241  struct crime_data *dev_crime_init(struct Line 241  struct crime_data *dev_crime_init(struct
241          d->use_fb = use_fb;          d->use_fb = use_fb;
242    
243          memory_device_register(mem, "crime", baseaddr, DEV_CRIME_LENGTH,          memory_device_register(mem, "crime", baseaddr, DEV_CRIME_LENGTH,
244              dev_crime_access, d, MEM_DEFAULT, NULL);              dev_crime_access, d, DM_DEFAULT, NULL);
245          machine_add_tickfunction(machine, dev_crime_tick, d, CRIME_TICKSHIFT);          machine_add_tickfunction(machine, dev_crime_tick, d, CRIME_TICKSHIFT);
246    
247          return d;          return d;
# Line 323  struct mace_data *dev_mace_init(struct m Line 323  struct mace_data *dev_mace_init(struct m
323          d->irqnr = irqnr;          d->irqnr = irqnr;
324    
325          memory_device_register(mem, "mace", baseaddr, DEV_MACE_LENGTH,          memory_device_register(mem, "mace", baseaddr, DEV_MACE_LENGTH,
326              dev_mace_access, d, MEM_DEFAULT, NULL);              dev_mace_access, d, DM_DEFAULT, NULL);
327    
328          return d;          return d;
329  }  }
# Line 372  int dev_macepci_access(struct cpu *cpu, Line 372  int dev_macepci_access(struct cpu *cpu,
372          case 0xcfc:     /*  PCI DATA  */          case 0xcfc:     /*  PCI DATA  */
373                  if (writeflag == MEM_WRITE) {                  if (writeflag == MEM_WRITE) {
374                          res = bus_pci_access(cpu, mem, relative_addr,                          res = bus_pci_access(cpu, mem, relative_addr,
375                              &idata, writeflag, d->pci_data);                              &idata, len, writeflag, d->pci_data);
376                  } else {                  } else {
377                          res = bus_pci_access(cpu, mem, relative_addr,                          res = bus_pci_access(cpu, mem, relative_addr,
378                              &odata, writeflag, d->pci_data);                              &odata, len, writeflag, d->pci_data);
                         /*  odata = 0;  */  
379                  }                  }
380                  break;                  break;
381          default:          default:
# Line 410  struct pci_data *dev_macepci_init(struct Line 409  struct pci_data *dev_macepci_init(struct
409          }          }
410          memset(d, 0, sizeof(struct macepci_data));          memset(d, 0, sizeof(struct macepci_data));
411    
412          d->pci_data = bus_pci_init(pciirq);          d->pci_data = bus_pci_init(pciirq, 0,0, 0,0,0, 0,0,0);
413    
414          memory_device_register(mem, "macepci", baseaddr, DEV_MACEPCI_LENGTH,          memory_device_register(mem, "macepci", baseaddr, DEV_MACEPCI_LENGTH,
415              dev_macepci_access, (void *)d, MEM_DEFAULT, NULL);              dev_macepci_access, (void *)d, DM_DEFAULT, NULL);
416    
417          return d->pci_data;          return d->pci_data;
418  }  }
# Line 957  void dev_sgi_mec_init(struct machine *ma Line 956  void dev_sgi_mec_init(struct machine *ma
956    
957          memory_device_register(mem, name2, baseaddr,          memory_device_register(mem, name2, baseaddr,
958              DEV_SGI_MEC_LENGTH, dev_sgi_mec_access, (void *)d,              DEV_SGI_MEC_LENGTH, dev_sgi_mec_access, (void *)d,
959              MEM_DEFAULT, NULL);              DM_DEFAULT, NULL);
960    
961          machine_add_tickfunction(machine, dev_sgi_mec_tick, d, MEC_TICK_SHIFT);          machine_add_tickfunction(machine, dev_sgi_mec_tick, d, MEC_TICK_SHIFT);
962    
# Line 1028  void dev_sgi_ust_init(struct memory *mem Line 1027  void dev_sgi_ust_init(struct memory *mem
1027    
1028          memory_device_register(mem, "sgi_ust", baseaddr,          memory_device_register(mem, "sgi_ust", baseaddr,
1029              DEV_SGI_UST_LENGTH, dev_sgi_ust_access, (void *)d,              DEV_SGI_UST_LENGTH, dev_sgi_ust_access, (void *)d,
1030              MEM_DEFAULT, NULL);              DM_DEFAULT, NULL);
1031  }  }
1032    
1033    
# Line 1303  void dev_sgi_mte_init(struct memory *mem Line 1302  void dev_sgi_mte_init(struct memory *mem
1302          memset(d, 0, sizeof(struct sgi_mte_data));          memset(d, 0, sizeof(struct sgi_mte_data));
1303    
1304          memory_device_register(mem, "sgi_mte", baseaddr, DEV_SGI_MTE_LENGTH,          memory_device_register(mem, "sgi_mte", baseaddr, DEV_SGI_MTE_LENGTH,
1305              dev_sgi_mte_access, (void *)d, MEM_DEFAULT, NULL);              dev_sgi_mte_access, (void *)d, DM_DEFAULT, NULL);
1306  }  }
1307    

Legend:
Removed from v.18  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26