23 |
#include "dev_c7200.h" |
#include "dev_c7200.h" |
24 |
|
|
25 |
/* ====================================================================== */ |
/* ====================================================================== */ |
26 |
/* PA-FE-TX / C7200-IO-FE */ |
/* C7200-IO-FE EEPROM */ |
27 |
/* ====================================================================== */ |
/* ====================================================================== */ |
28 |
|
|
|
/* PA-FE-TX: FastEthernet Port Adapter EEPROM */ |
|
|
static const m_uint16_t eeprom_c7200_pa_fe_tx_data[16] = { |
|
|
0x0111, 0x0102, 0xffff, 0xffff, 0x4906, 0x9804, 0x0000, 0x0000, |
|
|
0x6000, 0x0000, 0x9812, 0x1700, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, |
|
|
}; |
|
|
|
|
|
static const struct c7200_eeprom eeprom_c7200_pa_fe_tx = { |
|
|
"PA-FE-TX", (m_uint16_t *)eeprom_c7200_pa_fe_tx_data, |
|
|
sizeof(eeprom_c7200_pa_fe_tx_data)/2, |
|
|
}; |
|
|
|
|
29 |
/* C7200-IO-FE: C7200 IOCard with one FastEthernet port EEPROM */ |
/* C7200-IO-FE: C7200 IOCard with one FastEthernet port EEPROM */ |
30 |
static const m_uint16_t eeprom_c7200_io_fe_data[16] = { |
static const m_uint16_t eeprom_c7200_io_fe_data[16] = { |
31 |
0x0183, 0x010E, 0xffff, 0xffff, 0x490B, 0x8C02, 0x0000, 0x0000, |
0x0183, 0x010E, 0xffff, 0xffff, 0x490B, 0x8C02, 0x0000, 0x0000, |
32 |
0x5000, 0x0000, 0x9812, 0x2800, 0x00FF, 0xFFFF, 0xFFFF, 0xFFFF, |
0x5000, 0x0000, 0x9812, 0x2800, 0x00FF, 0xFFFF, 0xFFFF, 0xFFFF, |
33 |
}; |
}; |
34 |
|
|
35 |
static const struct c7200_eeprom eeprom_c7200_io_fe = { |
static const struct cisco_eeprom eeprom_c7200_io_fe = { |
36 |
"C7200-IO-FE", (m_uint16_t *)eeprom_c7200_io_fe_data, |
"C7200-IO-FE", (m_uint16_t *)eeprom_c7200_io_fe_data, |
37 |
sizeof(eeprom_c7200_io_fe_data)/2, |
sizeof(eeprom_c7200_io_fe_data)/2, |
38 |
}; |
}; |
58 |
/* Create the DEC21140 chip */ |
/* Create the DEC21140 chip */ |
59 |
data = dev_dec21140_init(router->vm,name, |
data = dev_dec21140_init(router->vm,name, |
60 |
router->pa_bay[pa_bay].pci_map, |
router->pa_bay[pa_bay].pci_map, |
|
/*router->npe_driver->dec21140_pci_bus,*/ //PCI |
|
61 |
router->npe_driver->dec21140_pci_dev, |
router->npe_driver->dec21140_pci_dev, |
62 |
C7200_NETIO_IRQ); |
C7200_NETIO_IRQ); |
63 |
if (!data) return(-1); |
if (!data) return(-1); |
114 |
struct dec21140_data *data; |
struct dec21140_data *data; |
115 |
|
|
116 |
/* Set the EEPROM */ |
/* Set the EEPROM */ |
117 |
c7200_pa_set_eeprom(router,pa_bay,&eeprom_c7200_pa_fe_tx); |
c7200_pa_set_eeprom(router,pa_bay,cisco_eeprom_find_pa("PA-FE-TX")); |
118 |
|
|
119 |
/* Create the DEC21140 chip */ |
/* Create the DEC21140 chip */ |
120 |
data = dev_dec21140_init(router->vm,name,router->pa_bay[pa_bay].pci_map,0, |
data = dev_dec21140_init(router->vm,name,router->pa_bay[pa_bay].pci_map,0, |
170 |
dev_c7200_iocard_shutdown, |
dev_c7200_iocard_shutdown, |
171 |
dev_c7200_iocard_set_nio, |
dev_c7200_iocard_set_nio, |
172 |
dev_c7200_iocard_unset_nio, |
dev_c7200_iocard_unset_nio, |
173 |
|
NULL, |
174 |
}; |
}; |
175 |
|
|
176 |
/* PA-FE-TX driver */ |
/* PA-FE-TX driver */ |
180 |
dev_c7200_pa_fe_tx_shutdown, |
dev_c7200_pa_fe_tx_shutdown, |
181 |
dev_c7200_pa_fe_tx_set_nio, |
dev_c7200_pa_fe_tx_set_nio, |
182 |
dev_c7200_pa_fe_tx_unset_nio, |
dev_c7200_pa_fe_tx_unset_nio, |
183 |
|
NULL, |
184 |
}; |
}; |
185 |
|
|
186 |
/* ====================================================================== */ |
/* ====================================================================== */ |
193 |
struct am79c971_data *port[8]; |
struct am79c971_data *port[8]; |
194 |
}; |
}; |
195 |
|
|
|
/* PA-4E: 4 Ethernet Port Adapter EEPROM */ |
|
|
static const m_uint16_t eeprom_c7200_pa_4e_data[16] = { |
|
|
0x0102, 0x010E, 0xFFFF, 0xFFFF, 0x4906, 0x1404, 0x0000, 0x0000, |
|
|
0x5000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, |
|
|
}; |
|
|
|
|
|
static const struct c7200_eeprom eeprom_c7200_pa_4e = { |
|
|
"PA-4E", (m_uint16_t *)eeprom_c7200_pa_4e_data, |
|
|
sizeof(eeprom_c7200_pa_4e_data)/2, |
|
|
}; |
|
|
|
|
|
/* PA-8E: 8 Ethernet Port Adapter EEPROM */ |
|
|
static const m_uint16_t eeprom_c7200_pa_8e_data[16] = { |
|
|
0x0101, 0x010E, 0xFFFF, 0xFFFF, 0x4906, 0x1404, 0x0000, 0x0000, |
|
|
0x5000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, |
|
|
}; |
|
|
|
|
|
static const struct c7200_eeprom eeprom_c7200_pa_8e = { |
|
|
"PA-8E", (m_uint16_t *)eeprom_c7200_pa_8e_data, |
|
|
sizeof(eeprom_c7200_pa_8e_data)/2, |
|
|
}; |
|
|
|
|
196 |
/* |
/* |
197 |
* dev_c7200_pa_4e_init() |
* dev_c7200_pa_4e_init() |
198 |
* |
* |
214 |
data->nr_port = 4; |
data->nr_port = 4; |
215 |
|
|
216 |
/* Set the EEPROM */ |
/* Set the EEPROM */ |
217 |
c7200_pa_set_eeprom(router,pa_bay,&eeprom_c7200_pa_4e); |
c7200_pa_set_eeprom(router,pa_bay,cisco_eeprom_find_pa("PA-4E")); |
218 |
|
|
219 |
/* Create the AMD Am79c971 chips */ |
/* Create the AMD Am79c971 chips */ |
220 |
for(i=0;i<data->nr_port;i++) { |
for(i=0;i<data->nr_port;i++) { |
248 |
data->nr_port = 8; |
data->nr_port = 8; |
249 |
|
|
250 |
/* Set the EEPROM */ |
/* Set the EEPROM */ |
251 |
c7200_pa_set_eeprom(router,pa_bay,&eeprom_c7200_pa_8e); |
c7200_pa_set_eeprom(router,pa_bay,cisco_eeprom_find_pa("PA-8E")); |
252 |
|
|
253 |
/* Create the AMD Am79c971 chips */ |
/* Create the AMD Am79c971 chips */ |
254 |
for(i=0;i<data->nr_port;i++) { |
for(i=0;i<data->nr_port;i++) { |
321 |
dev_c7200_pa_4e8e_shutdown, |
dev_c7200_pa_4e8e_shutdown, |
322 |
dev_c7200_pa_4e8e_set_nio, |
dev_c7200_pa_4e8e_set_nio, |
323 |
dev_c7200_pa_4e8e_unset_nio, |
dev_c7200_pa_4e8e_unset_nio, |
324 |
|
NULL, |
325 |
}; |
}; |
326 |
|
|
327 |
/* PA-8E driver */ |
/* PA-8E driver */ |
331 |
dev_c7200_pa_4e8e_shutdown, |
dev_c7200_pa_4e8e_shutdown, |
332 |
dev_c7200_pa_4e8e_set_nio, |
dev_c7200_pa_4e8e_set_nio, |
333 |
dev_c7200_pa_4e8e_unset_nio, |
dev_c7200_pa_4e8e_unset_nio, |
334 |
|
NULL, |
335 |
}; |
}; |