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 |
|
|
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 |
/* |
/* |