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

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

upstream/dynamips-0.2.6-RC1/dev_c7200_eth.c revision 2 by dpavlin, Sat Oct 6 16:03:58 2007 UTC upstream/dynamips-0.2.6-RC2/dev_c7200_eth.c revision 3 by dpavlin, Sat Oct 6 16:05:34 2007 UTC
# Line 23  Line 23 
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  };  };
# Line 69  static int dev_c7200_iocard_init(c7200_t Line 58  static int dev_c7200_iocard_init(c7200_t
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);
# Line 126  static int dev_c7200_pa_fe_tx_init(c7200 Line 114  static int dev_c7200_pa_fe_tx_init(c7200
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,
# Line 205  struct pa_4e8e_data { Line 193  struct pa_4e8e_data {
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   *   *
# Line 248  static int dev_c7200_pa_4e_init(c7200_t Line 214  static int dev_c7200_pa_4e_init(c7200_t
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++) {
# Line 282  static int dev_c7200_pa_8e_init(c7200_t Line 248  static int dev_c7200_pa_8e_init(c7200_t
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++) {

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

  ViewVC Help
Powered by ViewVC 1.1.26