diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-12-13 00:50:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-13 00:58:17 -0500 |
commit | 177dfcd80f28f8fbc3e22c2d8b24d21cb86f1d97 (patch) | |
tree | a6e5e9949f388d48ac20c4efbb2811762ac5f9d4 /drivers/net/sfc/falcon_hwdefs.h | |
parent | 356eebb2b3af24cc701823f1e025f04eef333239 (diff) |
sfc: Add support for sub-10G speeds
The SFC4000 has a separate MAC for use at sub-10G speeds. Introduce
an efx_mac_operations structure with implementations for the two MACs.
Switch between the MACs as necessary.
PHY settings are independent of the MAC, so add get_settings() and
set_settings() to efx_phy_operations. Also add macs field to indicate
which MACs the PHY is connected to.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_hwdefs.h')
-rw-r--r-- | drivers/net/sfc/falcon_hwdefs.h | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/drivers/net/sfc/falcon_hwdefs.h b/drivers/net/sfc/falcon_hwdefs.h index 040e70ed4ec7..5553df888b84 100644 --- a/drivers/net/sfc/falcon_hwdefs.h +++ b/drivers/net/sfc/falcon_hwdefs.h | |||
@@ -111,12 +111,18 @@ | |||
111 | 111 | ||
112 | /* NIC status register */ | 112 | /* NIC status register */ |
113 | #define NIC_STAT_REG 0x0200 | 113 | #define NIC_STAT_REG 0x0200 |
114 | #define EE_STRAP_EN_LBN 31 | ||
115 | #define EE_STRAP_EN_WIDTH 1 | ||
116 | #define EE_STRAP_OVR_LBN 24 | ||
117 | #define EE_STRAP_OVR_WIDTH 4 | ||
114 | #define ONCHIP_SRAM_LBN 16 | 118 | #define ONCHIP_SRAM_LBN 16 |
115 | #define ONCHIP_SRAM_WIDTH 1 | 119 | #define ONCHIP_SRAM_WIDTH 1 |
116 | #define SF_PRST_LBN 9 | 120 | #define SF_PRST_LBN 9 |
117 | #define SF_PRST_WIDTH 1 | 121 | #define SF_PRST_WIDTH 1 |
118 | #define EE_PRST_LBN 8 | 122 | #define EE_PRST_LBN 8 |
119 | #define EE_PRST_WIDTH 1 | 123 | #define EE_PRST_WIDTH 1 |
124 | #define STRAP_PINS_LBN 0 | ||
125 | #define STRAP_PINS_WIDTH 3 | ||
120 | /* These bit definitions are extrapolated from the list of numerical | 126 | /* These bit definitions are extrapolated from the list of numerical |
121 | * values for STRAP_PINS. | 127 | * values for STRAP_PINS. |
122 | */ | 128 | */ |
@@ -492,6 +498,107 @@ | |||
492 | #define MAC_MCAST_HASH_REG0_KER 0xca0 | 498 | #define MAC_MCAST_HASH_REG0_KER 0xca0 |
493 | #define MAC_MCAST_HASH_REG1_KER 0xcb0 | 499 | #define MAC_MCAST_HASH_REG1_KER 0xcb0 |
494 | 500 | ||
501 | /* GMAC configuration register 1 */ | ||
502 | #define GM_CFG1_REG 0xe00 | ||
503 | #define GM_SW_RST_LBN 31 | ||
504 | #define GM_SW_RST_WIDTH 1 | ||
505 | #define GM_LOOP_LBN 8 | ||
506 | #define GM_LOOP_WIDTH 1 | ||
507 | #define GM_RX_FC_EN_LBN 5 | ||
508 | #define GM_RX_FC_EN_WIDTH 1 | ||
509 | #define GM_TX_FC_EN_LBN 4 | ||
510 | #define GM_TX_FC_EN_WIDTH 1 | ||
511 | #define GM_RX_EN_LBN 2 | ||
512 | #define GM_RX_EN_WIDTH 1 | ||
513 | #define GM_TX_EN_LBN 0 | ||
514 | #define GM_TX_EN_WIDTH 1 | ||
515 | |||
516 | /* GMAC configuration register 2 */ | ||
517 | #define GM_CFG2_REG 0xe10 | ||
518 | #define GM_PAMBL_LEN_LBN 12 | ||
519 | #define GM_PAMBL_LEN_WIDTH 4 | ||
520 | #define GM_IF_MODE_LBN 8 | ||
521 | #define GM_IF_MODE_WIDTH 2 | ||
522 | #define GM_LEN_CHK_LBN 4 | ||
523 | #define GM_LEN_CHK_WIDTH 1 | ||
524 | #define GM_PAD_CRC_EN_LBN 2 | ||
525 | #define GM_PAD_CRC_EN_WIDTH 1 | ||
526 | #define GM_FD_LBN 0 | ||
527 | #define GM_FD_WIDTH 1 | ||
528 | |||
529 | /* GMAC maximum frame length register */ | ||
530 | #define GM_MAX_FLEN_REG 0xe40 | ||
531 | #define GM_MAX_FLEN_LBN 0 | ||
532 | #define GM_MAX_FLEN_WIDTH 16 | ||
533 | |||
534 | /* GMAC station address register 1 */ | ||
535 | #define GM_ADR1_REG 0xf00 | ||
536 | #define GM_HWADDR_5_LBN 24 | ||
537 | #define GM_HWADDR_5_WIDTH 8 | ||
538 | #define GM_HWADDR_4_LBN 16 | ||
539 | #define GM_HWADDR_4_WIDTH 8 | ||
540 | #define GM_HWADDR_3_LBN 8 | ||
541 | #define GM_HWADDR_3_WIDTH 8 | ||
542 | #define GM_HWADDR_2_LBN 0 | ||
543 | #define GM_HWADDR_2_WIDTH 8 | ||
544 | |||
545 | /* GMAC station address register 2 */ | ||
546 | #define GM_ADR2_REG 0xf10 | ||
547 | #define GM_HWADDR_1_LBN 24 | ||
548 | #define GM_HWADDR_1_WIDTH 8 | ||
549 | #define GM_HWADDR_0_LBN 16 | ||
550 | #define GM_HWADDR_0_WIDTH 8 | ||
551 | |||
552 | /* GMAC FIFO configuration register 0 */ | ||
553 | #define GMF_CFG0_REG 0xf20 | ||
554 | #define GMF_FTFENREQ_LBN 12 | ||
555 | #define GMF_FTFENREQ_WIDTH 1 | ||
556 | #define GMF_STFENREQ_LBN 11 | ||
557 | #define GMF_STFENREQ_WIDTH 1 | ||
558 | #define GMF_FRFENREQ_LBN 10 | ||
559 | #define GMF_FRFENREQ_WIDTH 1 | ||
560 | #define GMF_SRFENREQ_LBN 9 | ||
561 | #define GMF_SRFENREQ_WIDTH 1 | ||
562 | #define GMF_WTMENREQ_LBN 8 | ||
563 | #define GMF_WTMENREQ_WIDTH 1 | ||
564 | |||
565 | /* GMAC FIFO configuration register 1 */ | ||
566 | #define GMF_CFG1_REG 0xf30 | ||
567 | #define GMF_CFGFRTH_LBN 16 | ||
568 | #define GMF_CFGFRTH_WIDTH 5 | ||
569 | #define GMF_CFGXOFFRTX_LBN 0 | ||
570 | #define GMF_CFGXOFFRTX_WIDTH 16 | ||
571 | |||
572 | /* GMAC FIFO configuration register 2 */ | ||
573 | #define GMF_CFG2_REG 0xf40 | ||
574 | #define GMF_CFGHWM_LBN 16 | ||
575 | #define GMF_CFGHWM_WIDTH 6 | ||
576 | #define GMF_CFGLWM_LBN 0 | ||
577 | #define GMF_CFGLWM_WIDTH 6 | ||
578 | |||
579 | /* GMAC FIFO configuration register 3 */ | ||
580 | #define GMF_CFG3_REG 0xf50 | ||
581 | #define GMF_CFGHWMFT_LBN 16 | ||
582 | #define GMF_CFGHWMFT_WIDTH 6 | ||
583 | #define GMF_CFGFTTH_LBN 0 | ||
584 | #define GMF_CFGFTTH_WIDTH 6 | ||
585 | |||
586 | /* GMAC FIFO configuration register 4 */ | ||
587 | #define GMF_CFG4_REG 0xf60 | ||
588 | #define GMF_HSTFLTRFRM_PAUSE_LBN 12 | ||
589 | #define GMF_HSTFLTRFRM_PAUSE_WIDTH 12 | ||
590 | |||
591 | /* GMAC FIFO configuration register 5 */ | ||
592 | #define GMF_CFG5_REG 0xf70 | ||
593 | #define GMF_CFGHDPLX_LBN 22 | ||
594 | #define GMF_CFGHDPLX_WIDTH 1 | ||
595 | #define GMF_CFGBYTMODE_LBN 19 | ||
596 | #define GMF_CFGBYTMODE_WIDTH 1 | ||
597 | #define GMF_HSTDRPLT64_LBN 18 | ||
598 | #define GMF_HSTDRPLT64_WIDTH 1 | ||
599 | #define GMF_HSTFLTRFRMDC_PAUSE_LBN 12 | ||
600 | #define GMF_HSTFLTRFRMDC_PAUSE_WIDTH 1 | ||
601 | |||
495 | /* XGMAC address register low */ | 602 | /* XGMAC address register low */ |
496 | #define XM_ADR_LO_REG 0x1200 | 603 | #define XM_ADR_LO_REG 0x1200 |
497 | #define XM_ADR_3_LBN 24 | 604 | #define XM_ADR_3_LBN 24 |
@@ -962,54 +1069,103 @@ | |||
962 | ************************************************************************** | 1069 | ************************************************************************** |
963 | * | 1070 | * |
964 | */ | 1071 | */ |
1072 | |||
965 | #define GRxGoodOct_offset 0x0 | 1073 | #define GRxGoodOct_offset 0x0 |
1074 | #define GRxGoodOct_WIDTH 48 | ||
966 | #define GRxBadOct_offset 0x8 | 1075 | #define GRxBadOct_offset 0x8 |
1076 | #define GRxBadOct_WIDTH 48 | ||
967 | #define GRxMissPkt_offset 0x10 | 1077 | #define GRxMissPkt_offset 0x10 |
1078 | #define GRxMissPkt_WIDTH 32 | ||
968 | #define GRxFalseCRS_offset 0x14 | 1079 | #define GRxFalseCRS_offset 0x14 |
1080 | #define GRxFalseCRS_WIDTH 32 | ||
969 | #define GRxPausePkt_offset 0x18 | 1081 | #define GRxPausePkt_offset 0x18 |
1082 | #define GRxPausePkt_WIDTH 32 | ||
970 | #define GRxBadPkt_offset 0x1C | 1083 | #define GRxBadPkt_offset 0x1C |
1084 | #define GRxBadPkt_WIDTH 32 | ||
971 | #define GRxUcastPkt_offset 0x20 | 1085 | #define GRxUcastPkt_offset 0x20 |
1086 | #define GRxUcastPkt_WIDTH 32 | ||
972 | #define GRxMcastPkt_offset 0x24 | 1087 | #define GRxMcastPkt_offset 0x24 |
1088 | #define GRxMcastPkt_WIDTH 32 | ||
973 | #define GRxBcastPkt_offset 0x28 | 1089 | #define GRxBcastPkt_offset 0x28 |
1090 | #define GRxBcastPkt_WIDTH 32 | ||
974 | #define GRxGoodLt64Pkt_offset 0x2C | 1091 | #define GRxGoodLt64Pkt_offset 0x2C |
1092 | #define GRxGoodLt64Pkt_WIDTH 32 | ||
975 | #define GRxBadLt64Pkt_offset 0x30 | 1093 | #define GRxBadLt64Pkt_offset 0x30 |
1094 | #define GRxBadLt64Pkt_WIDTH 32 | ||
976 | #define GRx64Pkt_offset 0x34 | 1095 | #define GRx64Pkt_offset 0x34 |
1096 | #define GRx64Pkt_WIDTH 32 | ||
977 | #define GRx65to127Pkt_offset 0x38 | 1097 | #define GRx65to127Pkt_offset 0x38 |
1098 | #define GRx65to127Pkt_WIDTH 32 | ||
978 | #define GRx128to255Pkt_offset 0x3C | 1099 | #define GRx128to255Pkt_offset 0x3C |
1100 | #define GRx128to255Pkt_WIDTH 32 | ||
979 | #define GRx256to511Pkt_offset 0x40 | 1101 | #define GRx256to511Pkt_offset 0x40 |
1102 | #define GRx256to511Pkt_WIDTH 32 | ||
980 | #define GRx512to1023Pkt_offset 0x44 | 1103 | #define GRx512to1023Pkt_offset 0x44 |
1104 | #define GRx512to1023Pkt_WIDTH 32 | ||
981 | #define GRx1024to15xxPkt_offset 0x48 | 1105 | #define GRx1024to15xxPkt_offset 0x48 |
1106 | #define GRx1024to15xxPkt_WIDTH 32 | ||
982 | #define GRx15xxtoJumboPkt_offset 0x4C | 1107 | #define GRx15xxtoJumboPkt_offset 0x4C |
1108 | #define GRx15xxtoJumboPkt_WIDTH 32 | ||
983 | #define GRxGtJumboPkt_offset 0x50 | 1109 | #define GRxGtJumboPkt_offset 0x50 |
1110 | #define GRxGtJumboPkt_WIDTH 32 | ||
984 | #define GRxFcsErr64to15xxPkt_offset 0x54 | 1111 | #define GRxFcsErr64to15xxPkt_offset 0x54 |
1112 | #define GRxFcsErr64to15xxPkt_WIDTH 32 | ||
985 | #define GRxFcsErr15xxtoJumboPkt_offset 0x58 | 1113 | #define GRxFcsErr15xxtoJumboPkt_offset 0x58 |
1114 | #define GRxFcsErr15xxtoJumboPkt_WIDTH 32 | ||
986 | #define GRxFcsErrGtJumboPkt_offset 0x5C | 1115 | #define GRxFcsErrGtJumboPkt_offset 0x5C |
1116 | #define GRxFcsErrGtJumboPkt_WIDTH 32 | ||
987 | #define GTxGoodBadOct_offset 0x80 | 1117 | #define GTxGoodBadOct_offset 0x80 |
1118 | #define GTxGoodBadOct_WIDTH 48 | ||
988 | #define GTxGoodOct_offset 0x88 | 1119 | #define GTxGoodOct_offset 0x88 |
1120 | #define GTxGoodOct_WIDTH 48 | ||
989 | #define GTxSglColPkt_offset 0x90 | 1121 | #define GTxSglColPkt_offset 0x90 |
1122 | #define GTxSglColPkt_WIDTH 32 | ||
990 | #define GTxMultColPkt_offset 0x94 | 1123 | #define GTxMultColPkt_offset 0x94 |
1124 | #define GTxMultColPkt_WIDTH 32 | ||
991 | #define GTxExColPkt_offset 0x98 | 1125 | #define GTxExColPkt_offset 0x98 |
1126 | #define GTxExColPkt_WIDTH 32 | ||
992 | #define GTxDefPkt_offset 0x9C | 1127 | #define GTxDefPkt_offset 0x9C |
1128 | #define GTxDefPkt_WIDTH 32 | ||
993 | #define GTxLateCol_offset 0xA0 | 1129 | #define GTxLateCol_offset 0xA0 |
1130 | #define GTxLateCol_WIDTH 32 | ||
994 | #define GTxExDefPkt_offset 0xA4 | 1131 | #define GTxExDefPkt_offset 0xA4 |
1132 | #define GTxExDefPkt_WIDTH 32 | ||
995 | #define GTxPausePkt_offset 0xA8 | 1133 | #define GTxPausePkt_offset 0xA8 |
1134 | #define GTxPausePkt_WIDTH 32 | ||
996 | #define GTxBadPkt_offset 0xAC | 1135 | #define GTxBadPkt_offset 0xAC |
1136 | #define GTxBadPkt_WIDTH 32 | ||
997 | #define GTxUcastPkt_offset 0xB0 | 1137 | #define GTxUcastPkt_offset 0xB0 |
1138 | #define GTxUcastPkt_WIDTH 32 | ||
998 | #define GTxMcastPkt_offset 0xB4 | 1139 | #define GTxMcastPkt_offset 0xB4 |
1140 | #define GTxMcastPkt_WIDTH 32 | ||
999 | #define GTxBcastPkt_offset 0xB8 | 1141 | #define GTxBcastPkt_offset 0xB8 |
1142 | #define GTxBcastPkt_WIDTH 32 | ||
1000 | #define GTxLt64Pkt_offset 0xBC | 1143 | #define GTxLt64Pkt_offset 0xBC |
1144 | #define GTxLt64Pkt_WIDTH 32 | ||
1001 | #define GTx64Pkt_offset 0xC0 | 1145 | #define GTx64Pkt_offset 0xC0 |
1146 | #define GTx64Pkt_WIDTH 32 | ||
1002 | #define GTx65to127Pkt_offset 0xC4 | 1147 | #define GTx65to127Pkt_offset 0xC4 |
1148 | #define GTx65to127Pkt_WIDTH 32 | ||
1003 | #define GTx128to255Pkt_offset 0xC8 | 1149 | #define GTx128to255Pkt_offset 0xC8 |
1150 | #define GTx128to255Pkt_WIDTH 32 | ||
1004 | #define GTx256to511Pkt_offset 0xCC | 1151 | #define GTx256to511Pkt_offset 0xCC |
1152 | #define GTx256to511Pkt_WIDTH 32 | ||
1005 | #define GTx512to1023Pkt_offset 0xD0 | 1153 | #define GTx512to1023Pkt_offset 0xD0 |
1154 | #define GTx512to1023Pkt_WIDTH 32 | ||
1006 | #define GTx1024to15xxPkt_offset 0xD4 | 1155 | #define GTx1024to15xxPkt_offset 0xD4 |
1156 | #define GTx1024to15xxPkt_WIDTH 32 | ||
1007 | #define GTx15xxtoJumboPkt_offset 0xD8 | 1157 | #define GTx15xxtoJumboPkt_offset 0xD8 |
1158 | #define GTx15xxtoJumboPkt_WIDTH 32 | ||
1008 | #define GTxGtJumboPkt_offset 0xDC | 1159 | #define GTxGtJumboPkt_offset 0xDC |
1160 | #define GTxGtJumboPkt_WIDTH 32 | ||
1009 | #define GTxNonTcpUdpPkt_offset 0xE0 | 1161 | #define GTxNonTcpUdpPkt_offset 0xE0 |
1162 | #define GTxNonTcpUdpPkt_WIDTH 16 | ||
1010 | #define GTxMacSrcErrPkt_offset 0xE4 | 1163 | #define GTxMacSrcErrPkt_offset 0xE4 |
1164 | #define GTxMacSrcErrPkt_WIDTH 16 | ||
1011 | #define GTxIpSrcErrPkt_offset 0xE8 | 1165 | #define GTxIpSrcErrPkt_offset 0xE8 |
1166 | #define GTxIpSrcErrPkt_WIDTH 16 | ||
1012 | #define GDmaDone_offset 0xEC | 1167 | #define GDmaDone_offset 0xEC |
1168 | #define GDmaDone_WIDTH 32 | ||
1013 | 1169 | ||
1014 | #define XgRxOctets_offset 0x0 | 1170 | #define XgRxOctets_offset 0x0 |
1015 | #define XgRxOctets_WIDTH 48 | 1171 | #define XgRxOctets_WIDTH 48 |