14 |
#include "net.h" |
#include "net.h" |
15 |
#include "device.h" |
#include "device.h" |
16 |
#include "pci_dev.h" |
#include "pci_dev.h" |
17 |
#include "nmc93c46.h" |
#include "nmc93cX6.h" |
18 |
#include "net_io.h" |
#include "net_io.h" |
19 |
#include "vm.h" |
#include "vm.h" |
20 |
|
|
44 |
/* C2691 External Interrupt */ |
/* C2691 External Interrupt */ |
45 |
#define C2691_EXT_IRQ 6 |
#define C2691_EXT_IRQ 6 |
46 |
|
|
47 |
|
/* Network IRQ */ |
48 |
|
#define C2691_NETIO_IRQ_BASE 32 |
49 |
|
#define C2691_NETIO_IRQ_PORT_BITS 3 |
50 |
|
#define C2691_NETIO_IRQ_PORT_MASK ((1 << C2691_NETIO_IRQ_PORT_BITS) - 1) |
51 |
|
#define C2691_NETIO_IRQ_PER_SLOT (1 << C2691_NETIO_IRQ_PORT_BITS) |
52 |
|
#define C2691_NETIO_IRQ_END \ |
53 |
|
(C2691_NETIO_IRQ_BASE + (C2691_MAX_NM_BAYS * C2691_NETIO_IRQ_PER_SLOT) - 1) |
54 |
|
|
55 |
/* C2691 common device addresses */ |
/* C2691 common device addresses */ |
56 |
#define C2691_GT96K_ADDR 0x14000000ULL |
#define C2691_GT96K_ADDR 0x14000000ULL |
57 |
#define C2691_IOFPGA_ADDR 0x1e800000ULL |
#define C2691_IOFPGA_ADDR 0x1e800000ULL |
135 |
/* IO memory size to be passed to Smart Init */ |
/* IO memory size to be passed to Smart Init */ |
136 |
u_int nm_iomem_size; |
u_int nm_iomem_size; |
137 |
|
|
138 |
|
/* I/O FPGA */ |
139 |
|
struct c2691_iofpga_data *iofpga_data; |
140 |
|
|
141 |
/* Chassis information */ |
/* Chassis information */ |
142 |
struct c2691_nm_bay nm_bay[C2691_MAX_NM_BAYS]; |
struct c2691_nm_bay nm_bay[C2691_MAX_NM_BAYS]; |
143 |
m_uint8_t oir_status; |
m_uint8_t oir_status; |
147 |
* It can be modified to change the chassis MAC address. |
* It can be modified to change the chassis MAC address. |
148 |
*/ |
*/ |
149 |
struct cisco_eeprom mb_eeprom; |
struct cisco_eeprom mb_eeprom; |
150 |
struct nmc93c46_group mb_eeprom_group; |
struct nmc93cX6_group mb_eeprom_group; |
151 |
|
|
152 |
/* Network Module EEPROM */ |
/* Network Module EEPROM */ |
153 |
struct nmc93c46_group nm_eeprom_group; |
struct nmc93cX6_group nm_eeprom_group; |
154 |
}; |
}; |
155 |
|
|
156 |
/* Create a new router instance */ |
/* Create a new router instance */ |
168 |
/* Save configurations of all C2691 instances */ |
/* Save configurations of all C2691 instances */ |
169 |
void c2691_save_config_all(FILE *fd); |
void c2691_save_config_all(FILE *fd); |
170 |
|
|
171 |
|
/* Get network IRQ for specified slot/port */ |
172 |
|
u_int c2691_net_irq_for_slot_port(u_int slot,u_int port); |
173 |
|
|
174 |
/* Set NM EEPROM definition */ |
/* Set NM EEPROM definition */ |
175 |
int c2691_nm_set_eeprom(c2691_t *router,u_int nm_bay, |
int c2691_nm_set_eeprom(c2691_t *router,u_int nm_bay, |
176 |
const struct cisco_eeprom *eeprom); |
const struct cisco_eeprom *eeprom); |