/[dynamips]/upstream/dynamips-0.2.6-RC4/dev_c3600_iofpga.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 /upstream/dynamips-0.2.6-RC4/dev_c3600_iofpga.c

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

upstream/dynamips-0.2.5/dev_c3600_iofpga.c revision 1 by dpavlin, Sat Oct 6 16:01:44 2007 UTC upstream/dynamips-0.2.6-RC1/dev_c3600_iofpga.c revision 2 by dpavlin, Sat Oct 6 16:03:58 2007 UTC
# Line 39  Line 39 
39  #define EEPROM_NM_CLK   2  #define EEPROM_NM_CLK   2
40  #define EEPROM_NM_CS    4  #define EEPROM_NM_CS    4
41    
42    #define C3600_NET_IRQ_CLEARING_DELAY  16
43    
44  /* IO FPGA structure */  /* IO FPGA structure */
45  struct iofpga_data {  struct iofpga_data {
46     vm_obj_t vm_obj;     vm_obj_t vm_obj;
47     struct vdevice dev;     struct vdevice dev;
48     c3600_t *router;     c3600_t *router;
49      
50       /*
51        * Used to introduce a "delay" before clearing the network interrupt
52        * on 3620/3640 platforms. Added due to a packet loss when using an
53        * Ethernet NM on these platforms.
54        *
55        * Anyway, we should rely on the device information with appropriate IRQ
56        * routing.
57        */
58       int net_irq_clearing_count;
59      
60     /* Slot select for EEPROM access */     /* Slot select for EEPROM access */
61     u_int eeprom_slot;     u_int eeprom_slot;
62    
# Line 232  dev_c3620_c3640_iofpga_access(cpu_mips_t Line 244  dev_c3620_c3640_iofpga_access(cpu_mips_t
244        case 0x20001:        case 0x20001:
245        case 0x20002:        case 0x20002:
246        case 0x20003:        case 0x20003:
247           /* XXX Thisn't seem to be correct (at least on 3620) */           /* XXX This doesn't seem to be correct (at least on 3620) */
248           slot = offset - 0x20000;           slot = offset - 0x20000;
249    
250           if (op_type == MTS_READ)           if (op_type == MTS_READ)
251              *data = 0xFF;              *data = 0xFF;
252    
253           vm_clear_irq(d->router->vm,C3600_NETIO_IRQ);           if (++d->net_irq_clearing_count == C3600_NET_IRQ_CLEARING_DELAY) {
254                vm_clear_irq(d->router->vm,C3600_NETIO_IRQ);
255                d->net_irq_clearing_count = 0;
256             }
257           break;           break;
258    
259        /*        /*

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.26