Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tenxpress.c File Reference
#include <linux/delay.h>
#include <linux/rtnetlink.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include "efx.h"
#include "mdio_10g.h"
#include "nic.h"
#include "phy.h"
#include "workarounds.h"

Go to the source code of this file.

Data Structures

struct  tenxpress_phy_data
 

Macros

#define TENXPRESS_REQUIRED_DEVS
 
#define SFX7101_LOOPBACKS
 
#define MAX_BAD_LP_TRIES   (5)
 
#define PMA_PMD_XCONTROL_REG   49152
 
#define PMA_PMD_EXT_GMII_EN_LBN   1
 
#define PMA_PMD_EXT_GMII_EN_WIDTH   1
 
#define PMA_PMD_EXT_CLK_OUT_LBN   2
 
#define PMA_PMD_EXT_CLK_OUT_WIDTH   1
 
#define PMA_PMD_LNPGA_POWERDOWN_LBN   8
 
#define PMA_PMD_LNPGA_POWERDOWN_WIDTH   1
 
#define PMA_PMD_EXT_CLK312_WIDTH   1
 
#define PMA_PMD_EXT_LPOWER_LBN   12
 
#define PMA_PMD_EXT_LPOWER_WIDTH   1
 
#define PMA_PMD_EXT_ROBUST_LBN   14
 
#define PMA_PMD_EXT_ROBUST_WIDTH   1
 
#define PMA_PMD_EXT_SSR_LBN   15
 
#define PMA_PMD_EXT_SSR_WIDTH   1
 
#define PMA_PMD_XSTATUS_REG   49153
 
#define PMA_PMD_XSTAT_MDIX_LBN   14
 
#define PMA_PMD_XSTAT_FLP_LBN   (12)
 
#define PMA_PMD_LED_CTRL_REG   49159
 
#define PMA_PMA_LED_ACTIVITY_LBN   (3)
 
#define PMA_PMD_LED_OVERR_REG   49161
 
#define PMA_PMD_LED_LINK_LBN   (0)
 
#define PMA_PMD_LED_SPEED_LBN   (2)
 
#define PMA_PMD_LED_TX_LBN   (4)
 
#define PMA_PMD_LED_RX_LBN   (6)
 
#define PMA_PMD_LED_AUTO   (0) /* H/W control */
 
#define PMA_PMD_LED_ON   (1)
 
#define PMA_PMD_LED_OFF   (2)
 
#define PMA_PMD_LED_FLASH   (3)
 
#define PMA_PMD_LED_MASK   3
 
#define SFX7101_PMA_PMD_LED_DEFAULT   (PMA_PMD_LED_OFF << PMA_PMD_LED_RX_LBN)
 
#define PMA_PMD_SPEED_ENABLE_REG   49192
 
#define PMA_PMD_100TX_ADV_LBN   1
 
#define PMA_PMD_100TX_ADV_WIDTH   1
 
#define PMA_PMD_1000T_ADV_LBN   2
 
#define PMA_PMD_1000T_ADV_WIDTH   1
 
#define PMA_PMD_10000T_ADV_LBN   3
 
#define PMA_PMD_10000T_ADV_WIDTH   1
 
#define PMA_PMD_SPEED_LBN   4
 
#define PMA_PMD_SPEED_WIDTH   4
 
#define PCS_CLOCK_CTRL_REG   55297
 
#define PLL312_RST_N_LBN   2
 
#define PCS_SOFT_RST2_REG   55302
 
#define SERDES_RST_N_LBN   13
 
#define XGXS_RST_N_LBN   12
 
#define PCS_TEST_SELECT_REG   55303 /* PRM 10.5.8 */
 
#define CLK312_EN_LBN   3
 
#define PHYXS_XCONTROL_REG   49152
 
#define PHYXS_RESET_LBN   15
 
#define PHYXS_RESET_WIDTH   1
 
#define PHYXS_TEST1   (49162)
 
#define LOOPBACK_NEAR_LBN   (8)
 
#define LOOPBACK_NEAR_WIDTH   (1)
 
#define PCS_BOOT_STATUS_REG   53248
 
#define PCS_BOOT_FATAL_ERROR_LBN   0
 
#define PCS_BOOT_PROGRESS_LBN   1
 
#define PCS_BOOT_PROGRESS_WIDTH   2
 
#define PCS_BOOT_PROGRESS_INIT   0
 
#define PCS_BOOT_PROGRESS_WAIT_MDIO   1
 
#define PCS_BOOT_PROGRESS_CHECKSUM   2
 
#define PCS_BOOT_PROGRESS_JUMP   3
 
#define PCS_BOOT_DOWNLOAD_WAIT_LBN   3
 
#define PCS_BOOT_CODE_STARTED_LBN   4
 
#define GPHY_XCONTROL_REG   49152
 
#define GPHY_ISOLATE_LBN   10
 
#define GPHY_ISOLATE_WIDTH   1
 
#define GPHY_DUPLEX_LBN   8
 
#define GPHY_DUPLEX_WIDTH   1
 
#define GPHY_LOOPBACK_NEAR_LBN   14
 
#define GPHY_LOOPBACK_NEAR_WIDTH   1
 
#define C22EXT_STATUS_REG   49153
 
#define C22EXT_STATUS_LINK_LBN   2
 
#define C22EXT_STATUS_LINK_WIDTH   1
 
#define C22EXT_MSTSLV_CTRL   49161
 
#define C22EXT_MSTSLV_CTRL_ADV_1000_HD_LBN   8
 
#define C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN   9
 
#define C22EXT_MSTSLV_STATUS   49162
 
#define C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN   10
 
#define C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN   11
 
#define LNPGA_PDOWN_WAIT   (HZ / 5)
 

Functions

void tenxpress_set_id_led (struct efx_nic *efx, enum efx_led_mode mode)
 

Variables

struct efx_phy_operations falcon_sfx7101_phy_ops
 

Macro Definition Documentation

#define C22EXT_MSTSLV_CTRL   49161

Definition at line 133 of file tenxpress.c.

#define C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN   9

Definition at line 135 of file tenxpress.c.

#define C22EXT_MSTSLV_CTRL_ADV_1000_HD_LBN   8

Definition at line 134 of file tenxpress.c.

#define C22EXT_MSTSLV_STATUS   49162

Definition at line 137 of file tenxpress.c.

#define C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN   11

Definition at line 139 of file tenxpress.c.

#define C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN   10

Definition at line 138 of file tenxpress.c.

#define C22EXT_STATUS_LINK_LBN   2

Definition at line 130 of file tenxpress.c.

#define C22EXT_STATUS_LINK_WIDTH   1

Definition at line 131 of file tenxpress.c.

#define C22EXT_STATUS_REG   49153

Definition at line 129 of file tenxpress.c.

#define CLK312_EN_LBN   3

Definition at line 97 of file tenxpress.c.

#define GPHY_DUPLEX_LBN   8

Definition at line 124 of file tenxpress.c.

#define GPHY_DUPLEX_WIDTH   1

Definition at line 125 of file tenxpress.c.

#define GPHY_ISOLATE_LBN   10

Definition at line 122 of file tenxpress.c.

#define GPHY_ISOLATE_WIDTH   1

Definition at line 123 of file tenxpress.c.

#define GPHY_LOOPBACK_NEAR_LBN   14

Definition at line 126 of file tenxpress.c.

#define GPHY_LOOPBACK_NEAR_WIDTH   1

Definition at line 127 of file tenxpress.c.

#define GPHY_XCONTROL_REG   49152

Definition at line 121 of file tenxpress.c.

#define LNPGA_PDOWN_WAIT   (HZ / 5)

Definition at line 143 of file tenxpress.c.

#define LOOPBACK_NEAR_LBN   (8)

Definition at line 105 of file tenxpress.c.

#define LOOPBACK_NEAR_WIDTH   (1)

Definition at line 106 of file tenxpress.c.

#define MAX_BAD_LP_TRIES   (5)

Definition at line 34 of file tenxpress.c.

#define PCS_BOOT_CODE_STARTED_LBN   4

Definition at line 118 of file tenxpress.c.

#define PCS_BOOT_DOWNLOAD_WAIT_LBN   3

Definition at line 117 of file tenxpress.c.

#define PCS_BOOT_FATAL_ERROR_LBN   0

Definition at line 110 of file tenxpress.c.

#define PCS_BOOT_PROGRESS_CHECKSUM   2

Definition at line 115 of file tenxpress.c.

#define PCS_BOOT_PROGRESS_INIT   0

Definition at line 113 of file tenxpress.c.

#define PCS_BOOT_PROGRESS_JUMP   3

Definition at line 116 of file tenxpress.c.

#define PCS_BOOT_PROGRESS_LBN   1

Definition at line 111 of file tenxpress.c.

#define PCS_BOOT_PROGRESS_WAIT_MDIO   1

Definition at line 114 of file tenxpress.c.

#define PCS_BOOT_PROGRESS_WIDTH   2

Definition at line 112 of file tenxpress.c.

#define PCS_BOOT_STATUS_REG   53248

Definition at line 109 of file tenxpress.c.

#define PCS_CLOCK_CTRL_REG   55297

Definition at line 89 of file tenxpress.c.

#define PCS_SOFT_RST2_REG   55302

Definition at line 92 of file tenxpress.c.

#define PCS_TEST_SELECT_REG   55303 /* PRM 10.5.8 */

Definition at line 96 of file tenxpress.c.

#define PHYXS_RESET_LBN   15

Definition at line 101 of file tenxpress.c.

#define PHYXS_RESET_WIDTH   1

Definition at line 102 of file tenxpress.c.

#define PHYXS_TEST1   (49162)

Definition at line 104 of file tenxpress.c.

#define PHYXS_XCONTROL_REG   49152

Definition at line 100 of file tenxpress.c.

#define PLL312_RST_N_LBN   2

Definition at line 90 of file tenxpress.c.

#define PMA_PMA_LED_ACTIVITY_LBN   (3)

Definition at line 59 of file tenxpress.c.

#define PMA_PMD_10000T_ADV_LBN   3

Definition at line 83 of file tenxpress.c.

#define PMA_PMD_10000T_ADV_WIDTH   1

Definition at line 84 of file tenxpress.c.

#define PMA_PMD_1000T_ADV_LBN   2

Definition at line 81 of file tenxpress.c.

#define PMA_PMD_1000T_ADV_WIDTH   1

Definition at line 82 of file tenxpress.c.

#define PMA_PMD_100TX_ADV_LBN   1

Definition at line 79 of file tenxpress.c.

#define PMA_PMD_100TX_ADV_WIDTH   1

Definition at line 80 of file tenxpress.c.

#define PMA_PMD_EXT_CLK312_WIDTH   1

Definition at line 44 of file tenxpress.c.

#define PMA_PMD_EXT_CLK_OUT_LBN   2

Definition at line 40 of file tenxpress.c.

#define PMA_PMD_EXT_CLK_OUT_WIDTH   1

Definition at line 41 of file tenxpress.c.

#define PMA_PMD_EXT_GMII_EN_LBN   1

Definition at line 38 of file tenxpress.c.

#define PMA_PMD_EXT_GMII_EN_WIDTH   1

Definition at line 39 of file tenxpress.c.

#define PMA_PMD_EXT_LPOWER_LBN   12

Definition at line 45 of file tenxpress.c.

#define PMA_PMD_EXT_LPOWER_WIDTH   1

Definition at line 46 of file tenxpress.c.

#define PMA_PMD_EXT_ROBUST_LBN   14

Definition at line 47 of file tenxpress.c.

#define PMA_PMD_EXT_ROBUST_WIDTH   1

Definition at line 48 of file tenxpress.c.

#define PMA_PMD_EXT_SSR_LBN   15

Definition at line 49 of file tenxpress.c.

#define PMA_PMD_EXT_SSR_WIDTH   1

Definition at line 50 of file tenxpress.c.

#define PMA_PMD_LED_AUTO   (0) /* H/W control */

Definition at line 69 of file tenxpress.c.

#define PMA_PMD_LED_CTRL_REG   49159

Definition at line 58 of file tenxpress.c.

#define PMA_PMD_LED_FLASH   (3)

Definition at line 72 of file tenxpress.c.

#define PMA_PMD_LED_LINK_LBN   (0)

Definition at line 64 of file tenxpress.c.

#define PMA_PMD_LED_MASK   3

Definition at line 73 of file tenxpress.c.

#define PMA_PMD_LED_OFF   (2)

Definition at line 71 of file tenxpress.c.

#define PMA_PMD_LED_ON   (1)

Definition at line 70 of file tenxpress.c.

#define PMA_PMD_LED_OVERR_REG   49161

Definition at line 62 of file tenxpress.c.

#define PMA_PMD_LED_RX_LBN   (6)

Definition at line 67 of file tenxpress.c.

#define PMA_PMD_LED_SPEED_LBN   (2)

Definition at line 65 of file tenxpress.c.

#define PMA_PMD_LED_TX_LBN   (4)

Definition at line 66 of file tenxpress.c.

#define PMA_PMD_LNPGA_POWERDOWN_LBN   8

Definition at line 42 of file tenxpress.c.

#define PMA_PMD_LNPGA_POWERDOWN_WIDTH   1

Definition at line 43 of file tenxpress.c.

#define PMA_PMD_SPEED_ENABLE_REG   49192

Definition at line 78 of file tenxpress.c.

#define PMA_PMD_SPEED_LBN   4

Definition at line 85 of file tenxpress.c.

#define PMA_PMD_SPEED_WIDTH   4

Definition at line 86 of file tenxpress.c.

#define PMA_PMD_XCONTROL_REG   49152

Definition at line 37 of file tenxpress.c.

#define PMA_PMD_XSTAT_FLP_LBN   (12)

Definition at line 55 of file tenxpress.c.

#define PMA_PMD_XSTAT_MDIX_LBN   14

Definition at line 54 of file tenxpress.c.

#define PMA_PMD_XSTATUS_REG   49153

Definition at line 53 of file tenxpress.c.

#define SERDES_RST_N_LBN   13

Definition at line 93 of file tenxpress.c.

#define SFX7101_LOOPBACKS
Value:
((1 << LOOPBACK_PHYXS) | \
(1 << LOOPBACK_PCS) | \
(1 << LOOPBACK_PMAPMD) | \

Definition at line 26 of file tenxpress.c.

#define SFX7101_PMA_PMD_LED_DEFAULT   (PMA_PMD_LED_OFF << PMA_PMD_LED_RX_LBN)

Definition at line 76 of file tenxpress.c.

#define TENXPRESS_REQUIRED_DEVS
Value:
MDIO_DEVS_PCS | \
MDIO_DEVS_PHYXS | \
MDIO_DEVS_AN)

Definition at line 21 of file tenxpress.c.

#define XGXS_RST_N_LBN   12

Definition at line 94 of file tenxpress.c.

Function Documentation

void tenxpress_set_id_led ( struct efx_nic efx,
enum efx_led_mode  mode 
)

Definition at line 394 of file tenxpress.c.

Variable Documentation

struct efx_phy_operations falcon_sfx7101_phy_ops
Initial value:
= {
.probe = tenxpress_phy_probe,
.init = tenxpress_phy_init,
.reconfigure = tenxpress_phy_reconfigure,
.poll = tenxpress_phy_poll,
.fini = sfx7101_phy_fini,
.remove = tenxpress_phy_remove,
.get_settings = tenxpress_get_settings,
.set_settings = tenxpress_set_settings,
.set_npage_adv = sfx7101_set_npage_adv,
.test_alive = efx_mdio_test_alive,
.test_name = sfx7101_test_name,
.run_tests = sfx7101_run_tests,
}

Definition at line 481 of file tenxpress.c.