/[gxemul]/trunk/src/devices/dev_uninorth.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_uninorth.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: dev_uninorth.c,v 1.8 2007/02/16 17:17:51 debug Exp $   *  $Id: dev_uninorth.c,v 1.9 2007/06/15 19:57:34 debug Exp $
29   *     *  
30   *  Uni-North PCI controller (as used by MacPPC).   *  COMMENT: Uni-North PCI controller (used by MacPPC machines)
31   */   */
32    
33  #include <stdio.h>  #include <stdio.h>
# Line 110  DEVICE_ACCESS(uninorth_data) Line 110  DEVICE_ACCESS(uninorth_data)
110  }  }
111    
112    
 /*  
  *  dev_uninorth_init():  
  */  
113  struct pci_data *dev_uninorth_init(struct machine *machine, struct memory *mem,  struct pci_data *dev_uninorth_init(struct machine *machine, struct memory *mem,
114          uint64_t addr, int isa_irqbase, int pciirq)          uint64_t addr, int isa_irqbase, int pciirq)
115  {  {
# Line 121  struct pci_data *dev_uninorth_init(struc Line 118  struct pci_data *dev_uninorth_init(struc
118          uint64_t isa_portbase = 0, isa_membase = 0;          uint64_t isa_portbase = 0, isa_membase = 0;
119          uint64_t pci_portbase = 0, pci_membase = 0;          uint64_t pci_portbase = 0, pci_membase = 0;
120    
121          d = malloc(sizeof(struct uninorth_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct uninorth_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
122          memset(d, 0, sizeof(struct uninorth_data));          memset(d, 0, sizeof(struct uninorth_data));
123    
124          d->pciirq = pciirq;          d->pciirq = pciirq;
125    
126          pci_io_offset  = 0x00000000ULL;          pci_io_offset  = 0x00000000ULL;

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

  ViewVC Help
Powered by ViewVC 1.1.26