/[gxemul]/trunk/src/devices/dev_pmagja.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_pmagja.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_pmagja.c,v 1.21 2006/12/30 13:30:58 debug Exp $   *  $Id: dev_pmagja.c,v 1.22 2007/06/15 19:57:33 debug Exp $
29   *     *  
30   *  TURBOchannel PMAG-JA graphics device.   *  COMMENT: TURBOchannel PMAG-JA graphics card
31   *   *
32   *  TODO   *  TODO
33   */   */
# Line 64  struct pmagja_data { Line 64  struct pmagja_data {
64  };  };
65    
66    
 /*  
  *  dev_pmagja_access():  
  */  
67  DEVICE_ACCESS(pmagja)  DEVICE_ACCESS(pmagja)
68  {  {
         uint64_t idata = 0, odata = 0;  
69          struct pmagja_data *d = extra;          struct pmagja_data *d = extra;
70            uint64_t idata = 0, odata = 0;
71          size_t i, res = 1;          size_t i, res = 1;
72    
73          if (writeflag == MEM_WRITE)          if (writeflag == MEM_WRITE)
# Line 198  for (i=0; i<len; i++) Line 195  for (i=0; i<len; i++)
195  }  }
196    
197    
 /*  
  *  dev_pmagja_init():  
  */  
198  void dev_pmagja_init(struct machine *machine, struct memory *mem,  void dev_pmagja_init(struct machine *machine, struct memory *mem,
199          uint64_t baseaddr, char *irq_path)          uint64_t baseaddr, char *irq_path)
200  {  {
201          struct pmagja_data *d;          struct pmagja_data *d;
202    
203          d = malloc(sizeof(struct pmagja_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct pmagja_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
204          memset(d, 0, sizeof(struct pmagja_data));          memset(d, 0, sizeof(struct pmagja_data));
205    
206          INTERRUPT_CONNECT(irq_path, d->irq);          INTERRUPT_CONNECT(irq_path, d->irq);

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

  ViewVC Help
Powered by ViewVC 1.1.26