Changeset bb9e843 in rtems
- Timestamp:
- 03/14/05 21:45:03 (18 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- e9105d4
- Parents:
- fb77bc8
- Location:
- c/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/ChangeLog
rfb77bc8 rbb9e843 1 2005-03-14 Joel Sherrill <joel@OARcorp.com> 2 3 * libchip/network/dec21140.c, libchip/network/elnk.c, 4 libchip/network/if_fxp.c: Continue PCI API unification. All use 5 pci_find_device(). Network drivers manufacture a signature since all 6 calls have not been converted yet. 7 1 8 2005-03-04 Joel Sherrill <joel@OARcorp.com> 2 9 -
c/src/libchip/network/dec21140.c
rfb77bc8 rbb9e843 589 589 */ 590 590 setup_frm = (volatile unsigned char *)(bus_to_phys(rmd->buf1)); 591 eaddrs = ( char *)(sc->arpcom.ac_enaddr);591 eaddrs = (unsigned char *)(sc->arpcom.ac_enaddr); 592 592 /* Fill the buffer with our physical address. */ 593 593 for (i = 1; i < 16; i++) { … … 1013 1013 #if defined(__i386__) 1014 1014 int signature; 1015 int value; 1016 char interrupt; 1017 int diag; 1018 unsigned int deviceId; 1019 #endif 1015 unsigned int value; 1016 unsigned char interrupt; 1017 #endif 1018 int pbus, pdev, pfun; 1020 1019 #if defined(__PPC__) 1021 int pbus, pdev, pfun;1022 1020 int tmp; 1023 1021 unsigned int lvalue; … … 1040 1038 1041 1039 if (pci_initialize() != PCIB_ERR_SUCCESS) 1042 rtems_panic("Unable to initialize PCI"); 1043 1044 1040 rtems_panic("dec2114x: Unable to initialize PCI"); 1041 1042 /* 1043 * Find the board 1044 */ 1045 if ( pci_find_device(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21140, 1046 unitNumber-1, &pbus, &pdev, &pfun) == -1 ) { 1047 if ( pci_find_device(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21143, 1048 unitNumber-1, &pbus, &pdev, &pfun) != -1 ) { 1049 1050 /* the 21143 chip must be enabled before it can be accessed */ 1045 1051 #if defined(__i386__) 1046 /* 1047 * First, find a DEC board 1048 */ 1049 1050 /* 1051 * Try to find the network card on the PCI bus. Probe for a DEC 21140 1052 * card first. If not found probe the bus for a DEC/Intel 21143 card. 1053 */ 1054 deviceId = PCI_DEVICE_ID_DEC_21140; 1055 diag = pcib_find_by_devid( PCI_VENDOR_ID_DEC, deviceId, unitNumber-1, &signature); 1056 1057 if ( diag == PCIB_ERR_SUCCESS) 1058 printk( "DEC 21140 PCI network card found\n" ); 1059 else 1060 { 1061 deviceId = PCI_DEVICE_ID_DEC_21143; 1062 diag = pcib_find_by_devid( PCI_VENDOR_ID_DEC, deviceId, unitNumber-1, &signature); 1063 if ( diag == PCIB_ERR_SUCCESS) 1064 printk( "DEC/Intel 21143 PCI network card found\n" ); 1065 else 1066 { 1067 printk("No DEC/Intel 21140/3 PCI network card found !!\n"); 1068 return 0; 1069 } 1070 } 1071 #endif 1072 #if defined(__PPC__) 1073 /* 1074 * Find the board 1075 */ 1076 if( BSP_pciFindDevice( PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21140, 1077 unitNumber-1, &pbus, &pdev, &pfun) == -1 ) 1078 { 1079 if( BSP_pciFindDevice( PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21143, 1080 unitNumber-1, &pbus, &pdev, &pfun) != -1 ) 1081 { 1082 1083 pci_write_config_dword(pbus, 1084 pdev, 1085 pfun, 1086 0x40, 1087 PCI_DEVICE_ID_DEC_21143 ); 1088 1089 } 1090 else 1091 { 1052 signature = PCIB_DEVSIG_MAKE( pbus, pdev, pfun ); 1053 pcib_conf_write32( signature, 0x40, 0 ); 1054 #else 1055 pci_write_config_dword(pbus, pdev, pfun, 0x40, PCI_DEVICE_ID_DEC_21143); 1056 #endif 1057 1058 } else { 1092 1059 printk("dec2114x : device '%s' not found on PCI bus\n", config->name ); 1093 1060 return 0; … … 1096 1063 1097 1064 #ifdef DEC_DEBUG 1098 else 1099 { 1065 else { 1100 1066 printk("dec21140 : found device '%s', bus 0x%02x, dev 0x%02x, func 0x%02x\n", 1101 1067 config->name, pbus, pdev, pfun); … … 1103 1069 #endif 1104 1070 1105 #endif 1106 1071 #if defined(__i386__) 1072 signature = PCIB_DEVSIG_MAKE( pbus, pdev, pfun ); 1073 #endif 1107 1074 1108 1075 … … 1139 1106 */ 1140 1107 #if defined(__i386__) 1141 1142 /* the 21143 chip must be enabled before it can be accessed */1143 if ( deviceId == PCI_DEVICE_ID_DEC_21143 )1144 pcib_conf_write32( signature, 0x40, 0 );1145 1108 1146 1109 pcib_conf_read32(signature, 16, &value); -
c/src/libchip/network/elnk.c
rfb77bc8 rbb9e843 3140 3140 #if defined(__i386__) 3141 3141 int signature; 3142 intvalue;3143 charinterrupt;3142 unsigned int value; 3143 unsigned char interrupt; 3144 3144 #endif 3145 3145 #if defined(__PPC__) … … 3180 3180 for( i=0; !done && xl_devs[i].xl_vid; i++) 3181 3181 { 3182 for(unum= 1; !done && BSP_pciFindDevice( xl_devs[i].xl_vid, xl_devs[i].xl_did, unum-1, 3182 for(unum= 1; !done && 3183 pci_find_device( xl_devs[i].xl_vid, xl_devs[i].xl_did, unum-1, 3183 3184 &sysboards[numFound].pbus, 3184 3185 &sysboards[numFound].pdev, -
c/src/libchip/network/if_fxp.c
rfb77bc8 rbb9e843 460 460 * find device on pci bus 461 461 */ 462 { int j; 462 { int j; int pbus, pdev, pfun; 463 463 464 464 for (j=0; fxp_ident_table[j].devid; j++ ) { 465 i = pcib_find_by_devid( 0x8086, 466 fxp_ident_table[j].devid, 467 unitNumber-1, 468 &(sc->pci_signature)); 465 i = pci_find_device( 0x8086, fxp_ident_table[j].devid, 466 unitNumber-1, &pbus, &pdev, &pfun ); 467 sc->pci_signature = PCIB_DEVSIG_MAKE( pbus, pdev, pfun ); 469 468 DBGLVL_PRINTK(2,"fxp_attach: find_devid returned %d " 470 469 "and pci signature 0x%x\n",
Note: See TracChangeset
for help on using the changeset viewer.