--- upstream/dynamips-0.2.7-RC1/dev_c2691.h 2007/10/06 16:23:47 7 +++ upstream/dynamips-0.2.7-RC2/dev_c2691.h 2007/10/06 16:24:54 8 @@ -14,7 +14,7 @@ #include "net.h" #include "device.h" #include "pci_dev.h" -#include "nmc93c46.h" +#include "nmc93cX6.h" #include "net_io.h" #include "vm.h" @@ -44,6 +44,14 @@ /* C2691 External Interrupt */ #define C2691_EXT_IRQ 6 +/* Network IRQ */ +#define C2691_NETIO_IRQ_BASE 32 +#define C2691_NETIO_IRQ_PORT_BITS 3 +#define C2691_NETIO_IRQ_PORT_MASK ((1 << C2691_NETIO_IRQ_PORT_BITS) - 1) +#define C2691_NETIO_IRQ_PER_SLOT (1 << C2691_NETIO_IRQ_PORT_BITS) +#define C2691_NETIO_IRQ_END \ + (C2691_NETIO_IRQ_BASE + (C2691_MAX_NM_BAYS * C2691_NETIO_IRQ_PER_SLOT) - 1) + /* C2691 common device addresses */ #define C2691_GT96K_ADDR 0x14000000ULL #define C2691_IOFPGA_ADDR 0x1e800000ULL @@ -127,6 +135,9 @@ /* IO memory size to be passed to Smart Init */ u_int nm_iomem_size; + /* I/O FPGA */ + struct c2691_iofpga_data *iofpga_data; + /* Chassis information */ struct c2691_nm_bay nm_bay[C2691_MAX_NM_BAYS]; m_uint8_t oir_status; @@ -136,10 +147,10 @@ * It can be modified to change the chassis MAC address. */ struct cisco_eeprom mb_eeprom; - struct nmc93c46_group mb_eeprom_group; + struct nmc93cX6_group mb_eeprom_group; /* Network Module EEPROM */ - struct nmc93c46_group nm_eeprom_group; + struct nmc93cX6_group nm_eeprom_group; }; /* Create a new router instance */ @@ -157,6 +168,9 @@ /* Save configurations of all C2691 instances */ void c2691_save_config_all(FILE *fd); +/* Get network IRQ for specified slot/port */ +u_int c2691_net_irq_for_slot_port(u_int slot,u_int port); + /* Set NM EEPROM definition */ int c2691_nm_set_eeprom(c2691_t *router,u_int nm_bay, const struct cisco_eeprom *eeprom);