aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.h
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2010-02-17 10:17:03 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 20:27:39 -0500
commit79eb6904361fe4e54e589919a9b62c5e036c42c3 (patch)
tree5341c14a99cad6ab3442290828d759e22b45b2f5 /drivers/net/tg3.h
parent24daf2b0a4005f3a4e757752fcfed9da276cf202 (diff)
tg3: Rename tg3 phy ID preprocessor definitions
The phylib presents the phy ID in a different format than the one tg3 has traditionally used. To highlight the distinction, this patch prepends the tg3 native phy ID format with TG3. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r--drivers/net/tg3.h91
1 files changed, 45 insertions, 46 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 12ce22644ac8..800dec463e98 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2921,45 +2921,59 @@ struct tg3 {
2921 2921
2922 /* PHY info */ 2922 /* PHY info */
2923 u32 phy_id; 2923 u32 phy_id;
2924#define PHY_ID_MASK 0xfffffff0 2924#define TG3_PHY_ID_MASK 0xfffffff0
2925#define PHY_ID_BCM5400 0x60008040 2925#define TG3_PHY_ID_BCM5400 0x60008040
2926#define PHY_ID_BCM5401 0x60008050 2926#define TG3_PHY_ID_BCM5401 0x60008050
2927#define PHY_ID_BCM5411 0x60008070 2927#define TG3_PHY_ID_BCM5411 0x60008070
2928#define PHY_ID_BCM5701 0x60008110 2928#define TG3_PHY_ID_BCM5701 0x60008110
2929#define PHY_ID_BCM5703 0x60008160 2929#define TG3_PHY_ID_BCM5703 0x60008160
2930#define PHY_ID_BCM5704 0x60008190 2930#define TG3_PHY_ID_BCM5704 0x60008190
2931#define PHY_ID_BCM5705 0x600081a0 2931#define TG3_PHY_ID_BCM5705 0x600081a0
2932#define PHY_ID_BCM5750 0x60008180 2932#define TG3_PHY_ID_BCM5750 0x60008180
2933#define PHY_ID_BCM5752 0x60008100 2933#define TG3_PHY_ID_BCM5752 0x60008100
2934#define PHY_ID_BCM5714 0x60008340 2934#define TG3_PHY_ID_BCM5714 0x60008340
2935#define PHY_ID_BCM5780 0x60008350 2935#define TG3_PHY_ID_BCM5780 0x60008350
2936#define PHY_ID_BCM5755 0xbc050cc0 2936#define TG3_PHY_ID_BCM5755 0xbc050cc0
2937#define PHY_ID_BCM5787 0xbc050ce0 2937#define TG3_PHY_ID_BCM5787 0xbc050ce0
2938#define PHY_ID_BCM5756 0xbc050ed0 2938#define TG3_PHY_ID_BCM5756 0xbc050ed0
2939#define PHY_ID_BCM5784 0xbc050fa0 2939#define TG3_PHY_ID_BCM5784 0xbc050fa0
2940#define PHY_ID_BCM5761 0xbc050fd0 2940#define TG3_PHY_ID_BCM5761 0xbc050fd0
2941#define PHY_ID_BCM5718C 0x5c0d8a00 2941#define TG3_PHY_ID_BCM5718C 0x5c0d8a00
2942#define PHY_ID_BCM5718S 0xbc050ff0 2942#define TG3_PHY_ID_BCM5718S 0xbc050ff0
2943#define PHY_ID_BCM57765 0x5c0d8a40 2943#define TG3_PHY_ID_BCM57765 0x5c0d8a40
2944#define PHY_ID_BCM5906 0xdc00ac40 2944#define TG3_PHY_ID_BCM5906 0xdc00ac40
2945#define PHY_ID_BCM8002 0x60010140 2945#define TG3_PHY_ID_BCM8002 0x60010140
2946#define PHY_ID_INVALID 0xffffffff 2946#define TG3_PHY_ID_BCM50610 0x0143bd60
2947#define PHY_ID_REV_MASK 0x0000000f 2947#define TG3_PHY_ID_BCM50610M 0x0143bd70
2948#define PHY_REV_BCM5401_B0 0x1 2948#define TG3_PHY_ID_BCMAC131 0x0143bc70
2949#define PHY_REV_BCM5401_B2 0x3
2950#define PHY_REV_BCM5401_C0 0x6
2951#define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */
2952#define TG3_PHY_ID_BCM50610 0x143bd60
2953#define TG3_PHY_ID_BCM50610M 0x143bd70
2954#define TG3_PHY_ID_BCMAC131 0x143bc70
2955#define TG3_PHY_ID_RTL8211C 0x001cc910 2949#define TG3_PHY_ID_RTL8211C 0x001cc910
2956#define TG3_PHY_ID_RTL8201E 0x00008200 2950#define TG3_PHY_ID_RTL8201E 0x00008200
2957#define TG3_PHY_ID_BCM57780 0x03625d90 2951#define TG3_PHY_ID_BCM57780 0x03625d90
2952#define TG3_PHY_ID_INVALID 0xffffffff
2953
2954#define TG3_PHY_ID_REV_MASK 0x0000000f
2955#define TG3_PHY_REV_BCM5401_B0 0x1
2956
2958#define TG3_PHY_OUI_MASK 0xfffffc00 2957#define TG3_PHY_OUI_MASK 0xfffffc00
2959#define TG3_PHY_OUI_1 0x00206000 2958#define TG3_PHY_OUI_1 0x00206000
2960#define TG3_PHY_OUI_2 0x0143bc00 2959#define TG3_PHY_OUI_2 0x0143bc00
2961#define TG3_PHY_OUI_3 0x03625c00 2960#define TG3_PHY_OUI_3 0x03625c00
2962 2961
2962 /* This macro assumes the passed PHY ID is
2963 * already masked with TG3_PHY_ID_MASK.
2964 */
2965#define TG3_KNOWN_PHY_ID(X) \
2966 ((X) == TG3_PHY_ID_BCM5400 || (X) == TG3_PHY_ID_BCM5401 || \
2967 (X) == TG3_PHY_ID_BCM5411 || (X) == TG3_PHY_ID_BCM5701 || \
2968 (X) == TG3_PHY_ID_BCM5703 || (X) == TG3_PHY_ID_BCM5704 || \
2969 (X) == TG3_PHY_ID_BCM5705 || (X) == TG3_PHY_ID_BCM5750 || \
2970 (X) == TG3_PHY_ID_BCM5752 || (X) == TG3_PHY_ID_BCM5714 || \
2971 (X) == TG3_PHY_ID_BCM5780 || (X) == TG3_PHY_ID_BCM5787 || \
2972 (X) == TG3_PHY_ID_BCM5755 || (X) == TG3_PHY_ID_BCM5756 || \
2973 (X) == TG3_PHY_ID_BCM5906 || (X) == TG3_PHY_ID_BCM5761 || \
2974 (X) == TG3_PHY_ID_BCM5718C || (X) == TG3_PHY_ID_BCM5718S || \
2975 (X) == TG3_PHY_ID_BCM57765 || (X) == TG3_PHY_ID_BCM8002)
2976
2963 u32 led_ctrl; 2977 u32 led_ctrl;
2964 u32 phy_otp; 2978 u32 phy_otp;
2965 2979
@@ -2971,21 +2985,6 @@ struct tg3 {
2971 u32 pci_clock_ctrl; 2985 u32 pci_clock_ctrl;
2972 struct pci_dev *pdev_peer; 2986 struct pci_dev *pdev_peer;
2973 2987
2974 /* This macro assumes the passed PHY ID is already masked
2975 * with PHY_ID_MASK.
2976 */
2977#define KNOWN_PHY_ID(X) \
2978 ((X) == PHY_ID_BCM5400 || (X) == PHY_ID_BCM5401 || \
2979 (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \
2980 (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \
2981 (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \
2982 (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \
2983 (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \
2984 (X) == PHY_ID_BCM5755 || (X) == PHY_ID_BCM5756 || \
2985 (X) == PHY_ID_BCM5906 || (X) == PHY_ID_BCM5761 || \
2986 (X) == PHY_ID_BCM5718C || (X) == PHY_ID_BCM5718S || \
2987 (X) == PHY_ID_BCM57765 || (X) == PHY_ID_BCM8002)
2988
2989 struct tg3_hw_stats *hw_stats; 2988 struct tg3_hw_stats *hw_stats;
2990 dma_addr_t stats_mapping; 2989 dma_addr_t stats_mapping;
2991 struct work_struct reset_task; 2990 struct work_struct reset_task;