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

Go to the source code of this file.

Data Structures

struct  txc43128_data
 

Macros

#define TXC_REQUIRED_DEVS
 
#define TXC_LOOPBACKS
 
#define TXCNAME   "TXC43128"
 
#define TXC_MAX_RESET_TIME   500
 
#define TXC_RESET_WAIT   10
 
#define TXC_BIST_DURATION   50
 
#define TXC_GLRGS_GLCMD   0xc004
 
#define TXC_GLCMD_L01PD_LBN   5
 
#define TXC_GLCMD_L23PD_LBN   6
 
#define TXC_GLCMD_LMTSWRST_LBN   14
 
#define TXC_GLRGS_GSGQLCTL   0xc01a
 
#define TXC_GSGQLCT_SGQLEN_LBN   15
 
#define TXC_GSGQLCT_LNSL_LBN   13
 
#define TXC_GSGQLCT_LNSL_WIDTH   2
 
#define TXC_ALRGS_ATXCTL   0xc040
 
#define TXC_ATXCTL_TXPD3_LBN   15
 
#define TXC_ATXCTL_TXPD2_LBN   14
 
#define TXC_ATXCTL_TXPD1_LBN   13
 
#define TXC_ATXCTL_TXPD0_LBN   12
 
#define TXC_ALRGS_ATXAMP0   0xc041
 
#define TXC_ALRGS_ATXAMP1   0xc042
 
#define TXC_ATXAMP_LANE02_LBN   3
 
#define TXC_ATXAMP_LANE13_LBN   11
 
#define TXC_ATXAMP_1280_mV   0
 
#define TXC_ATXAMP_1200_mV   8
 
#define TXC_ATXAMP_1120_mV   12
 
#define TXC_ATXAMP_1060_mV   14
 
#define TXC_ATXAMP_0820_mV   25
 
#define TXC_ATXAMP_0720_mV   26
 
#define TXC_ATXAMP_0580_mV   27
 
#define TXC_ATXAMP_0440_mV   28
 
#define TXC_ATXAMP_0820_BOTH
 
#define TXC_ATXAMP_DEFAULT   0x6060 /* From databook */
 
#define TXC_ALRGS_ATXPRE0   0xc043
 
#define TXC_ALRGS_ATXPRE1   0xc044
 
#define TXC_ATXPRE_NONE   0
 
#define TXC_ATXPRE_DEFAULT   0x1010 /* From databook */
 
#define TXC_ALRGS_ARXCTL   0xc045
 
#define TXC_ARXCTL_RXPD3_LBN   15
 
#define TXC_ARXCTL_RXPD2_LBN   14
 
#define TXC_ARXCTL_RXPD1_LBN   13
 
#define TXC_ARXCTL_RXPD0_LBN   12
 
#define TXC_MRGS_CTL   0xc340
 
#define TXC_MCTL_RESET_LBN   15 /* Self clear */
 
#define TXC_MCTL_TXLED_LBN   14 /* 1 to show align status */
 
#define TXC_MCTL_RXLED_LBN   13 /* 1 to show align status */
 
#define TXC_GPIO_OUTPUT   0xc346
 
#define TXC_GPIO_DIR   0xc348
 
#define TXC_BIST_CTL   0xc280
 
#define TXC_BIST_TXFRMCNT   0xc281
 
#define TXC_BIST_RX0FRMCNT   0xc282
 
#define TXC_BIST_RX1FRMCNT   0xc283
 
#define TXC_BIST_RX2FRMCNT   0xc284
 
#define TXC_BIST_RX3FRMCNT   0xc285
 
#define TXC_BIST_RX0ERRCNT   0xc286
 
#define TXC_BIST_RX1ERRCNT   0xc287
 
#define TXC_BIST_RX2ERRCNT   0xc288
 
#define TXC_BIST_RX3ERRCNT   0xc289
 
#define TXC_BIST_CTRL_TYPE_LBN   10
 
#define TXC_BIST_CTRL_TYPE_TSD   0 /* TranSwitch Deterministic */
 
#define TXC_BIST_CTRL_TYPE_CRP   1 /* CRPAT standard */
 
#define TXC_BIST_CTRL_TYPE_CJP   2 /* CJPAT standard */
 
#define TXC_BIST_CTRL_TYPE_TSR   3 /* TranSwitch pseudo-random */
 
#define TXC_BIST_CTRL_B10EN_LBN   12
 
#define TXC_BIST_CTRL_ENAB_LBN   13
 
#define TXC_BIST_CTRL_STOP_LBN   14
 
#define TXC_BIST_CTRL_STRT_LBN   15
 
#define TXC_MTDIABLO_CTRL   0xc34f
 
#define TXC_MTDIABLO_CTRL_PMA_LOOP_LBN   10
 
#define BUG10934_RESET_INTERVAL   (5 * HZ)
 

Functions

void falcon_txc_set_gpio_val (struct efx_nic *efx, int pin, int on)
 
void falcon_txc_set_gpio_dir (struct efx_nic *efx, int pin, int dir)
 

Variables

struct efx_phy_operations falcon_txc_phy_ops
 

Macro Definition Documentation

#define BUG10934_RESET_INTERVAL   (5 * HZ)

Definition at line 168 of file txc43128_phy.c.

#define TXC_ALRGS_ARXCTL   0xc045

Definition at line 110 of file txc43128_phy.c.

#define TXC_ALRGS_ATXAMP0   0xc041

Definition at line 79 of file txc43128_phy.c.

#define TXC_ALRGS_ATXAMP1   0xc042

Definition at line 81 of file txc43128_phy.c.

#define TXC_ALRGS_ATXCTL   0xc040

Definition at line 71 of file txc43128_phy.c.

#define TXC_ALRGS_ATXPRE0   0xc043

Definition at line 103 of file txc43128_phy.c.

#define TXC_ALRGS_ATXPRE1   0xc044

Definition at line 105 of file txc43128_phy.c.

#define TXC_ARXCTL_RXPD0_LBN   12

Definition at line 115 of file txc43128_phy.c.

#define TXC_ARXCTL_RXPD1_LBN   13

Definition at line 114 of file txc43128_phy.c.

#define TXC_ARXCTL_RXPD2_LBN   14

Definition at line 113 of file txc43128_phy.c.

#define TXC_ARXCTL_RXPD3_LBN   15

Definition at line 112 of file txc43128_phy.c.

#define TXC_ATXAMP_0440_mV   28

Definition at line 94 of file txc43128_phy.c.

#define TXC_ATXAMP_0580_mV   27

Definition at line 93 of file txc43128_phy.c.

#define TXC_ATXAMP_0720_mV   26

Definition at line 92 of file txc43128_phy.c.

#define TXC_ATXAMP_0820_BOTH
#define TXC_ATXAMP_0820_mV   25

Definition at line 91 of file txc43128_phy.c.

#define TXC_ATXAMP_1060_mV   14

Definition at line 90 of file txc43128_phy.c.

#define TXC_ATXAMP_1120_mV   12

Definition at line 89 of file txc43128_phy.c.

#define TXC_ATXAMP_1200_mV   8

Definition at line 88 of file txc43128_phy.c.

#define TXC_ATXAMP_1280_mV   0

Definition at line 87 of file txc43128_phy.c.

#define TXC_ATXAMP_DEFAULT   0x6060 /* From databook */

Definition at line 100 of file txc43128_phy.c.

#define TXC_ATXAMP_LANE02_LBN   3

Definition at line 83 of file txc43128_phy.c.

#define TXC_ATXAMP_LANE13_LBN   11

Definition at line 85 of file txc43128_phy.c.

#define TXC_ATXCTL_TXPD0_LBN   12

Definition at line 76 of file txc43128_phy.c.

#define TXC_ATXCTL_TXPD1_LBN   13

Definition at line 75 of file txc43128_phy.c.

#define TXC_ATXCTL_TXPD2_LBN   14

Definition at line 74 of file txc43128_phy.c.

#define TXC_ATXCTL_TXPD3_LBN   15

Definition at line 73 of file txc43128_phy.c.

#define TXC_ATXPRE_DEFAULT   0x1010 /* From databook */

Definition at line 108 of file txc43128_phy.c.

#define TXC_ATXPRE_NONE   0

Definition at line 107 of file txc43128_phy.c.

#define TXC_BIST_CTL   0xc280

Definition at line 129 of file txc43128_phy.c.

#define TXC_BIST_CTRL_B10EN_LBN   12

Definition at line 147 of file txc43128_phy.c.

#define TXC_BIST_CTRL_ENAB_LBN   13

Definition at line 149 of file txc43128_phy.c.

#define TXC_BIST_CTRL_STOP_LBN   14

Definition at line 151 of file txc43128_phy.c.

#define TXC_BIST_CTRL_STRT_LBN   15

Definition at line 153 of file txc43128_phy.c.

#define TXC_BIST_CTRL_TYPE_CJP   2 /* CJPAT standard */

Definition at line 144 of file txc43128_phy.c.

#define TXC_BIST_CTRL_TYPE_CRP   1 /* CRPAT standard */

Definition at line 143 of file txc43128_phy.c.

#define TXC_BIST_CTRL_TYPE_LBN   10

Definition at line 141 of file txc43128_phy.c.

#define TXC_BIST_CTRL_TYPE_TSD   0 /* TranSwitch Deterministic */

Definition at line 142 of file txc43128_phy.c.

#define TXC_BIST_CTRL_TYPE_TSR   3 /* TranSwitch pseudo-random */

Definition at line 145 of file txc43128_phy.c.

#define TXC_BIST_DURATION   50

Definition at line 43 of file txc43128_phy.c.

#define TXC_BIST_RX0ERRCNT   0xc286

Definition at line 135 of file txc43128_phy.c.

#define TXC_BIST_RX0FRMCNT   0xc282

Definition at line 131 of file txc43128_phy.c.

#define TXC_BIST_RX1ERRCNT   0xc287

Definition at line 136 of file txc43128_phy.c.

#define TXC_BIST_RX1FRMCNT   0xc283

Definition at line 132 of file txc43128_phy.c.

#define TXC_BIST_RX2ERRCNT   0xc288

Definition at line 137 of file txc43128_phy.c.

#define TXC_BIST_RX2FRMCNT   0xc284

Definition at line 133 of file txc43128_phy.c.

#define TXC_BIST_RX3ERRCNT   0xc289

Definition at line 138 of file txc43128_phy.c.

#define TXC_BIST_RX3FRMCNT   0xc285

Definition at line 134 of file txc43128_phy.c.

#define TXC_BIST_TXFRMCNT   0xc281

Definition at line 130 of file txc43128_phy.c.

#define TXC_GLCMD_L01PD_LBN   5

Definition at line 56 of file txc43128_phy.c.

#define TXC_GLCMD_L23PD_LBN   6

Definition at line 57 of file txc43128_phy.c.

#define TXC_GLCMD_LMTSWRST_LBN   14

Definition at line 60 of file txc43128_phy.c.

#define TXC_GLRGS_GLCMD   0xc004

Definition at line 53 of file txc43128_phy.c.

#define TXC_GLRGS_GSGQLCTL   0xc01a

Definition at line 63 of file txc43128_phy.c.

#define TXC_GPIO_DIR   0xc348

Definition at line 126 of file txc43128_phy.c.

#define TXC_GPIO_OUTPUT   0xc346

Definition at line 125 of file txc43128_phy.c.

#define TXC_GSGQLCT_LNSL_LBN   13

Definition at line 67 of file txc43128_phy.c.

#define TXC_GSGQLCT_LNSL_WIDTH   2

Definition at line 68 of file txc43128_phy.c.

#define TXC_GSGQLCT_SGQLEN_LBN   15

Definition at line 65 of file txc43128_phy.c.

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

Definition at line 27 of file txc43128_phy.c.

#define TXC_MAX_RESET_TIME   500

Definition at line 39 of file txc43128_phy.c.

#define TXC_MCTL_RESET_LBN   15 /* Self clear */

Definition at line 120 of file txc43128_phy.c.

#define TXC_MCTL_RXLED_LBN   13 /* 1 to show align status */

Definition at line 122 of file txc43128_phy.c.

#define TXC_MCTL_TXLED_LBN   14 /* 1 to show align status */

Definition at line 121 of file txc43128_phy.c.

#define TXC_MRGS_CTL   0xc340

Definition at line 118 of file txc43128_phy.c.

#define TXC_MTDIABLO_CTRL   0xc34f

Definition at line 156 of file txc43128_phy.c.

#define TXC_MTDIABLO_CTRL_PMA_LOOP_LBN   10

Definition at line 157 of file txc43128_phy.c.

#define TXC_REQUIRED_DEVS
Value:
MDIO_DEVS_PMAPMD | \
MDIO_DEVS_PHYXS)

Definition at line 23 of file txc43128_phy.c.

#define TXC_RESET_WAIT   10

Definition at line 41 of file txc43128_phy.c.

#define TXCNAME   "TXC43128"

Definition at line 37 of file txc43128_phy.c.

Function Documentation

void falcon_txc_set_gpio_dir ( struct efx_nic efx,
int  pin,
int  dir 
)

Definition at line 180 of file txc43128_phy.c.

void falcon_txc_set_gpio_val ( struct efx_nic efx,
int  pin,
int  on 
)

Definition at line 174 of file txc43128_phy.c.

Variable Documentation

struct efx_phy_operations falcon_txc_phy_ops
Initial value:
= {
.probe = txc43128_phy_probe,
.init = txc43128_phy_init,
.reconfigure = txc43128_phy_reconfigure,
.poll = txc43128_phy_poll,
.fini = txc43128_phy_fini,
.remove = txc43128_phy_remove,
.get_settings = txc43128_get_settings,
.set_settings = efx_mdio_set_settings,
.test_alive = efx_mdio_test_alive,
.run_tests = txc43128_run_tests,
.test_name = txc43128_test_name,
}

Definition at line 548 of file txc43128_phy.c.