aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang, Xiong <xiong@qca.qualcomm.com>2012-04-18 18:01:26 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-19 20:14:20 -0400
commit7f5544d6693ab2593b4f13521a577387f3be6b2f (patch)
tree42ce54fd2622dbac1c4653227c0517c794bca431
parent95f9aea76943af35b4720c61d27fa09c30f237dd (diff)
atl1c: refine reg definition of REG_MASTER_CTRL
refine/update register REG_MASTER_CTRL definition according with hardware spec. Signed-off-by: xiong <xiong@qca.qualcomm.com> Tested-by: Liu David <dwliu@qca.qualcomm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_hw.h41
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c2
2 files changed, 24 insertions, 19 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
index 6d73ac92db94..9779b830bafa 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
@@ -148,26 +148,31 @@ int atl1c_phy_power_saving(struct atl1c_hw *hw);
148 148
149#define REG_LTSSM_ID_CTRL 0x12FC 149#define REG_LTSSM_ID_CTRL 0x12FC
150#define LTSSM_ID_EN_WRO 0x1000 150#define LTSSM_ID_EN_WRO 0x1000
151
152
151/* Selene Master Control Register */ 153/* Selene Master Control Register */
152#define REG_MASTER_CTRL 0x1400 154#define REG_MASTER_CTRL 0x1400
153#define MASTER_CTRL_SOFT_RST 0x1 155#define MASTER_CTRL_OTP_SEL BIT(31)
154#define MASTER_CTRL_TEST_MODE_MASK 0x3 156#define MASTER_DEV_NUM_MASK 0x7FUL
155#define MASTER_CTRL_TEST_MODE_SHIFT 2 157#define MASTER_DEV_NUM_SHIFT 24
156#define MASTER_CTRL_BERT_START 0x10 158#define MASTER_REV_NUM_MASK 0xFFUL
157#define MASTER_CTRL_OOB_DIS_OFF 0x40 159#define MASTER_REV_NUM_SHIFT 16
158#define MASTER_CTRL_SA_TIMER_EN 0x80 160#define MASTER_CTRL_INT_RDCLR BIT(14)
159#define MASTER_CTRL_MTIMER_EN 0x100 161#define MASTER_CTRL_CLK_SEL_DIS BIT(12) /* 1:alwys sel pclk from
160#define MASTER_CTRL_MANUAL_INT 0x200 162 * serdes, not sw to 25M */
161#define MASTER_CTRL_TX_ITIMER_EN 0x400 163#define MASTER_CTRL_RX_ITIMER_EN BIT(11) /* IRQ MODURATION FOR RX */
162#define MASTER_CTRL_RX_ITIMER_EN 0x800 164#define MASTER_CTRL_TX_ITIMER_EN BIT(10) /* MODURATION FOR TX/RX */
163#define MASTER_CTRL_CLK_SEL_DIS 0x1000 165#define MASTER_CTRL_MANU_INT BIT(9) /* SOFT MANUAL INT */
164#define MASTER_CTRL_CLK_SWH_MODE 0x2000 166#define MASTER_CTRL_MANUTIMER_EN BIT(8)
165#define MASTER_CTRL_INT_RDCLR 0x4000 167#define MASTER_CTRL_SA_TIMER_EN BIT(7) /* SYS ALIVE TIMER EN */
166#define MASTER_CTRL_REV_NUM_SHIFT 16 168#define MASTER_CTRL_OOB_DIS BIT(6) /* OUT OF BOX DIS */
167#define MASTER_CTRL_REV_NUM_MASK 0xff 169#define MASTER_CTRL_WAKEN_25M BIT(5) /* WAKE WO. PCIE CLK */
168#define MASTER_CTRL_DEV_ID_SHIFT 24 170#define MASTER_CTRL_BERT_START BIT(4)
169#define MASTER_CTRL_DEV_ID_MASK 0x7f 171#define MASTER_PCIE_TSTMOD_MASK 3UL
170#define MASTER_CTRL_OTP_SEL 0x80000000 172#define MASTER_PCIE_TSTMOD_SHIFT 2
173#define MASTER_PCIE_RST BIT(1)
174#define MASTER_CTRL_SOFT_RST BIT(0) /* RST MAC & DMA */
175#define DMA_MAC_RST_TO 50
171 176
172/* Timer Initial Value Register */ 177/* Timer Initial Value Register */
173#define REG_MANUAL_TIMER_INIT 0x1404 178#define REG_MANUAL_TIMER_INIT 0x1404
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 729381ac8d1e..796cc758c967 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1179,7 +1179,7 @@ static int atl1c_reset_mac(struct atl1c_hw *hw)
1179 * clearing, and should clear within a microsecond. 1179 * clearing, and should clear within a microsecond.
1180 */ 1180 */
1181 AT_READ_REG(hw, REG_MASTER_CTRL, &master_ctrl_data); 1181 AT_READ_REG(hw, REG_MASTER_CTRL, &master_ctrl_data);
1182 master_ctrl_data |= MASTER_CTRL_OOB_DIS_OFF; 1182 master_ctrl_data |= MASTER_CTRL_OOB_DIS;
1183 AT_WRITE_REGW(hw, REG_MASTER_CTRL, ((master_ctrl_data | MASTER_CTRL_SOFT_RST) 1183 AT_WRITE_REGW(hw, REG_MASTER_CTRL, ((master_ctrl_data | MASTER_CTRL_SOFT_RST)
1184 & 0xFFFF)); 1184 & 0xFFFF));
1185 1185