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

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

revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 34 by dpavlin, Mon Oct 8 16:21:17 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2004-2006  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_ohci.c,v 1.8 2006/02/09 20:02:59 debug Exp $   *  $Id: dev_ohci.c,v 1.10 2007/01/28 00:41:17 debug Exp $
29   *     *  
30   *  USB OHCI (Open Host Controller Interface).   *  USB OHCI (Open Host Controller Interface).
31   *   *
# Line 38  Line 38 
38    
39  #include "cpu.h"  #include "cpu.h"
40  #include "device.h"  #include "device.h"
41    #include "interrupt.h"
42  #include "machine.h"  #include "machine.h"
43  #include "memory.h"  #include "memory.h"
44  #include "misc.h"  #include "misc.h"
# Line 53  Line 54 
54    
55    
56  struct ohci_data {  struct ohci_data {
57          int     irq_nr;          struct interrupt        irq;
58    
59          int     port1reset;          int                     port1reset;
60  };  };
61    
62    
# Line 82  DEVICE_ACCESS(ohci) Line 83  DEVICE_ACCESS(ohci)
83                  name = "COMMAND_STATUS";                  name = "COMMAND_STATUS";
84                  if (idata == 0x2) {                  if (idata == 0x2) {
85  fatal("URK\n");  fatal("URK\n");
86                          cpu_interrupt(cpu, d->irq_nr);                          INTERRUPT_ASSERT(d->irq);
87                  }                  }
88                  break;                  break;
89          case OHCI_INTERRUPT_STATUS:          case OHCI_INTERRUPT_STATUS:
# Line 159  DEVINIT(ohci) Line 160  DEVINIT(ohci)
160                  exit(1);                  exit(1);
161          }          }
162          memset(d, 0, sizeof(struct ohci_data));          memset(d, 0, sizeof(struct ohci_data));
163          d->irq_nr = devinit->irq_nr;  
164            INTERRUPT_CONNECT(devinit->interrupt_path, d->irq);
165    
166          memory_device_register(devinit->machine->memory,          memory_device_register(devinit->machine->memory,
167              devinit->name, devinit->addr,              devinit->name, devinit->addr,

Legend:
Removed from v.22  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26