Changeset 18295
- Timestamp:
- 01/24/12 05:40:42 (17 months ago)
- Location:
- src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240
- Files:
-
- 2 edited
-
ag7240.c (modified) (1 diff)
-
ar7240_s26_phy.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240/ag7240.c
r18294 r18295 310 310 #endif 311 311 312 if (is_ar7240() || is_ar7241() || (is_ar7242() && mac->mac_unit == 1))312 if (is_ar7240() || is_ar7241() || is_ar933x() || (is_ar7242() && mac->mac_unit == 1)) 313 313 athrs26_enable_linkIntrs(mac->mac_unit); 314 314 -
src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240/ar7240_s26_phy.c
r18171 r18295 385 385 386 386 /* Enable WAN mac inside S26 */ 387 if (mac_has_flag(mac,ETH_SWONLY_MODE) )387 if (mac_has_flag(mac,ETH_SWONLY_MODE) || is_ar933x() ) 388 388 athrs26_reg_write(PORT_STATUS_REGISTER5,0x200); 389 389 … … 579 579 athrs26_reg_write(0x104,athrs26_reg_read(0x104)|(0x1<<11)); 580 580 581 if (mac_has_flag(mac,ETH_SWONLY_MODE) )581 if (mac_has_flag(mac,ETH_SWONLY_MODE) || is_ar933x()) 582 582 athrs26_reg_write(PORT_STATUS_REGISTER5,0x200); 583 583 … … 1031 1031 unit = 0; 1032 1032 } 1033 else if(is_ar7241() || is_ar7242() ) {1033 else if(is_ar7241() || is_ar7242() || is_ar933x()) { 1034 1034 unit = 1; 1035 1035 } … … 1065 1065 unit = 0; 1066 1066 } 1067 else if(is_ar7241() || is_ar7242() ) {1067 else if(is_ar7241() || is_ar7242() || is_ar933x()) { 1068 1068 unit = 1; 1069 1069 } 1070 1070 1071 phy_reg_write(unit,phy_address, reg_address, data); 1072 1073 phy_address = (0x17 & ((addr_temp >> 4) | 0x10)); 1074 1075 reg_address = (((addr_temp << 1) & 0x1e) | 0x1); 1076 data = s26_write_data >> 16; 1077 phy_reg_write(unit,phy_address, reg_address, data); 1078 1079 reg_address = ((addr_temp << 1) & 0x1e); 1080 data = s26_write_data & 0xffff; 1081 phy_reg_write(unit,phy_address, reg_address, data); 1071 if(is_ar933x()) 1072 { 1073 //The writing sequence need special care for register 0x40,0x50,0x98, because the busy bit design 1074 //0x98: L->H (write low address first, then high address), 0x40: H->L, 0x50: H->L 1075 //Other registers: any sequence is working. 1076 if(s26_addr!=0x98) 1077 { 1078 phy_reg_write(unit, phy_address, reg_address, data); 1079 1080 phy_address = 0x17 & ((addr_temp >> 4) | 0x10); 1081 reg_address = ((addr_temp << 1) & 0x1e) | 0x1; 1082 data = s26_write_data >> 16; 1083 phy_reg_write(unit, phy_address, reg_address, data); 1084 1085 reg_address = reg_address & 0x1e; 1086 data = s26_write_data & 0xffff; 1087 phy_reg_write(unit, phy_address, reg_address, data); 1088 } 1089 else 1090 { 1091 phy_reg_write(unit, phy_address, reg_address, data); 1092 1093 phy_address = (0x17 & ((addr_temp >> 4) | 0x10)); 1094 reg_address = ((addr_temp << 1) & 0x1e); 1095 1096 data = s26_write_data & 0xffff; 1097 phy_reg_write(unit, phy_address, reg_address, data); 1098 1099 reg_address = (((addr_temp << 1) & 0x1e) | 0x1); 1100 data = s26_write_data >> 16; 1101 phy_reg_write(unit, phy_address, reg_address, data); 1102 1103 } 1104 } 1105 else 1106 { 1107 phy_reg_write(unit,phy_address, reg_address, data); 1108 1109 phy_address = (0x17 & ((addr_temp >> 4) | 0x10)); 1110 1111 reg_address = (((addr_temp << 1) & 0x1e) | 0x1); 1112 data = s26_write_data >> 16; 1113 phy_reg_write(unit,phy_address, reg_address, data); 1114 1115 reg_address = ((addr_temp << 1) & 0x1e); 1116 data = s26_write_data & 0xffff; 1117 phy_reg_write(unit,phy_address, reg_address, data); 1118 } 1082 1119 } 1083 1120
Note: See TracChangeset
for help on using the changeset viewer.
