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

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

revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2004-2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2004-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:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_ahc.c,v 1.2 2005/11/13 00:14:08 debug Exp $   *  $Id: dev_ahc.c,v 1.8 2007/06/15 18:44:18 debug Exp $
29   *   *
30   *  Adaptec AHC SCSI controller.   *  COMMENT: Adaptec AHC SCSI controller
31   *   *
32   *  NetBSD should say something like this, on SGI-IP32:   *  NetBSD should say something like this, on SGI-IP32:
33   *      ahc0 at pci0 dev 1 function 0   *      ahc0 at pci0 dev 1 function 0
# Line 62  struct ahc_data { Line 62  struct ahc_data {
62  };  };
63    
64    
65  /*  DEVICE_ACCESS(ahc)
  *  dev_ahc_access():  
  */  
 int dev_ahc_access(struct cpu *cpu, struct memory *mem,  
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
66  {  {
67          struct ahc_data *d = extra;          struct ahc_data *d = extra;
68          uint64_t idata, odata = 0;          uint64_t idata, odata = 0;
# Line 169  int dev_ahc_access(struct cpu *cpu, stru Line 164  int dev_ahc_access(struct cpu *cpu, stru
164                              (int)relative_addr);                              (int)relative_addr);
165          }          }
166    
 #if 0  
 cpu_interrupt(cpu, 0x200);  
 #endif  
   
167  #ifdef AHC_DEBUG  #ifdef AHC_DEBUG
168          if (ok) {          if (ok) {
169                  if (name == NULL) {                  if (name == NULL) {
# Line 200  cpu_interrupt(cpu, 0x200); Line 191  cpu_interrupt(cpu, 0x200);
191  }  }
192    
193    
194  /*  DEVINIT(ahc)
  *  devinit_ahc():  
  */  
 int devinit_ahc(struct devinit *devinit)  
195  {  {
196          struct ahc_data *d = malloc(sizeof(struct ahc_data));          struct ahc_data *d;
197          if (d == NULL) {  
198                  fprintf(stderr, "out of memory\n");          CHECK_ALLOCATION(d = malloc(sizeof(struct ahc_data)));
                 exit(1);  
         }  
199          memset(d, 0, sizeof(struct ahc_data));          memset(d, 0, sizeof(struct ahc_data));
200    
201          memory_device_register(devinit->machine->memory, devinit->name,          memory_device_register(devinit->machine->memory, devinit->name,

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

  ViewVC Help
Powered by ViewVC 1.1.26