aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/nphy.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-01-17 19:09:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:10:44 -0500
commit95b66bad55b846e02e5b5c8b32ac4a659c28149b (patch)
treeec1f46c1cf212bc5de6a0450cdcc002481a8e032 /drivers/net/wireless/b43/nphy.h
parentc09c7237eadc65916305835ca1e3ee8a03f01159 (diff)
b43: Add more N-PHY init code
This also adds lots of TODOs. Oh well. Lots of work. :) Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/nphy.h')
-rw-r--r--drivers/net/wireless/b43/nphy.h52
1 files changed, 29 insertions, 23 deletions
diff --git a/drivers/net/wireless/b43/nphy.h b/drivers/net/wireless/b43/nphy.h
index 896b46849ba1..5d95118b8193 100644
--- a/drivers/net/wireless/b43/nphy.h
+++ b/drivers/net/wireless/b43/nphy.h
@@ -25,8 +25,11 @@
25#define B43_NPHY_C1_CCK_BCLIPBKOFF B43_PHY_N(0x01B) /* Core 1 CCK barely clip backoff */ 25#define B43_NPHY_C1_CCK_BCLIPBKOFF B43_PHY_N(0x01B) /* Core 1 CCK barely clip backoff */
26#define B43_NPHY_C1_CGAINI B43_PHY_N(0x01C) /* Core 1 compute gain info */ 26#define B43_NPHY_C1_CGAINI B43_PHY_N(0x01C) /* Core 1 compute gain info */
27#define B43_NPHY_C1_CGAINI_GAINBKOFF 0x001F /* Gain backoff */ 27#define B43_NPHY_C1_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
28#define B43_NPHY_C1_CGAINI_GAINBKOFF_SHIFT 0
28#define B43_NPHY_C1_CGAINI_CLIPGBKOFF 0x03E0 /* Clip gain backoff */ 29#define B43_NPHY_C1_CGAINI_CLIPGBKOFF 0x03E0 /* Clip gain backoff */
30#define B43_NPHY_C1_CGAINI_CLIPGBKOFF_SHIFT 5
29#define B43_NPHY_C1_CGAINI_GAINSTEP 0x1C00 /* Gain step */ 31#define B43_NPHY_C1_CGAINI_GAINSTEP 0x1C00 /* Gain step */
32#define B43_NPHY_C1_CGAINI_GAINSTEP_SHIFT 10
30#define B43_NPHY_C1_CGAINI_CL2DETECT 0x2000 /* Clip 2 detect mask */ 33#define B43_NPHY_C1_CGAINI_CL2DETECT 0x2000 /* Clip 2 detect mask */
31#define B43_NPHY_C1_CCK_CGAINI B43_PHY_N(0x01D) /* Core 1 CCK compute gain info */ 34#define B43_NPHY_C1_CCK_CGAINI B43_PHY_N(0x01D) /* Core 1 CCK compute gain info */
32#define B43_NPHY_C1_CCK_CGAINI_GAINBKOFF 0x001F /* Gain backoff */ 35#define B43_NPHY_C1_CCK_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
@@ -69,29 +72,32 @@
69#define B43_NPHY_C1_CLIP1THRES B43_PHY_N(0x02C) /* Core 1 clip1 threshold */ 72#define B43_NPHY_C1_CLIP1THRES B43_PHY_N(0x02C) /* Core 1 clip1 threshold */
70#define B43_NPHY_C1_CLIP2THRES B43_PHY_N(0x02D) /* Core 1 clip2 threshold */ 73#define B43_NPHY_C1_CLIP2THRES B43_PHY_N(0x02D) /* Core 1 clip2 threshold */
71 74
72#define B43_NPHY_C2_DESPWR B43_PHY_N(0x018 + 22) /* Core 2 desired power */ 75#define B43_NPHY_C2_DESPWR B43_PHY_N(0x02E) /* Core 2 desired power */
73#define B43_NPHY_C2_CCK_DESPWR B43_PHY_N(0x019 + 22) /* Core 2 CCK desired power */ 76#define B43_NPHY_C2_CCK_DESPWR B43_PHY_N(0x02F) /* Core 2 CCK desired power */
74#define B43_NPHY_C2_BCLIPBKOFF B43_PHY_N(0x01A + 22) /* Core 2 barely clip backoff */ 77#define B43_NPHY_C2_BCLIPBKOFF B43_PHY_N(0x030) /* Core 2 barely clip backoff */
75#define B43_NPHY_C2_CCK_BCLIPBKOFF B43_PHY_N(0x01B + 22) /* Core 2 CCK barely clip backoff */ 78#define B43_NPHY_C2_CCK_BCLIPBKOFF B43_PHY_N(0x031) /* Core 2 CCK barely clip backoff */
76#define B43_NPHY_C2_CGAINI B43_PHY_N(0x01C + 22) /* Core 2 compute gain info */ 79#define B43_NPHY_C2_CGAINI B43_PHY_N(0x032) /* Core 2 compute gain info */
77#define B43_NPHY_C2_CGAINI_GAINBKOFF 0x001F /* Gain backoff */ 80#define B43_NPHY_C2_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
81#define B43_NPHY_C2_CGAINI_GAINBKOFF_SHIFT 0
78#define B43_NPHY_C2_CGAINI_CLIPGBKOFF 0x03E0 /* Clip gain backoff */ 82#define B43_NPHY_C2_CGAINI_CLIPGBKOFF 0x03E0 /* Clip gain backoff */
83#define B43_NPHY_C2_CGAINI_CLIPGBKOFF_SHIFT 5
79#define B43_NPHY_C2_CGAINI_GAINSTEP 0x1C00 /* Gain step */ 84#define B43_NPHY_C2_CGAINI_GAINSTEP 0x1C00 /* Gain step */
85#define B43_NPHY_C2_CGAINI_GAINSTEP_SHIFT 10
80#define B43_NPHY_C2_CGAINI_CL2DETECT 0x2000 /* Clip 2 detect mask */ 86#define B43_NPHY_C2_CGAINI_CL2DETECT 0x2000 /* Clip 2 detect mask */
81#define B43_NPHY_C2_CCK_CGAINI B43_PHY_N(0x01D + 22) /* Core 2 CCK compute gain info */ 87#define B43_NPHY_C2_CCK_CGAINI B43_PHY_N(0x033) /* Core 2 CCK compute gain info */
82#define B43_NPHY_C2_CCK_CGAINI_GAINBKOFF 0x001F /* Gain backoff */ 88#define B43_NPHY_C2_CCK_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
83#define B43_NPHY_C2_CCK_CGAINI_CLIPGBKOFF 0x01E0 /* CCK barely clip gain backoff */ 89#define B43_NPHY_C2_CCK_CGAINI_CLIPGBKOFF 0x01E0 /* CCK barely clip gain backoff */
84#define B43_NPHY_C2_MINMAX_GAIN B43_PHY_N(0x01E + 22) /* Core 2 min/max gain */ 90#define B43_NPHY_C2_MINMAX_GAIN B43_PHY_N(0x034) /* Core 2 min/max gain */
85#define B43_NPHY_C2_MINGAIN 0x00FF /* Minimum gain */ 91#define B43_NPHY_C2_MINGAIN 0x00FF /* Minimum gain */
86#define B43_NPHY_C2_MINGAIN_SHIFT 0 92#define B43_NPHY_C2_MINGAIN_SHIFT 0
87#define B43_NPHY_C2_MAXGAIN 0xFF00 /* Maximum gain */ 93#define B43_NPHY_C2_MAXGAIN 0xFF00 /* Maximum gain */
88#define B43_NPHY_C2_MAXGAIN_SHIFT 8 94#define B43_NPHY_C2_MAXGAIN_SHIFT 8
89#define B43_NPHY_C2_CCK_MINMAX_GAIN B43_PHY_N(0x01F + 22) /* Core 2 CCK min/max gain */ 95#define B43_NPHY_C2_CCK_MINMAX_GAIN B43_PHY_N(0x035) /* Core 2 CCK min/max gain */
90#define B43_NPHY_C2_CCK_MINGAIN 0x00FF /* Minimum gain */ 96#define B43_NPHY_C2_CCK_MINGAIN 0x00FF /* Minimum gain */
91#define B43_NPHY_C2_CCK_MINGAIN_SHIFT 0 97#define B43_NPHY_C2_CCK_MINGAIN_SHIFT 0
92#define B43_NPHY_C2_CCK_MAXGAIN 0xFF00 /* Maximum gain */ 98#define B43_NPHY_C2_CCK_MAXGAIN 0xFF00 /* Maximum gain */
93#define B43_NPHY_C2_CCK_MAXGAIN_SHIFT 8 99#define B43_NPHY_C2_CCK_MAXGAIN_SHIFT 8
94#define B43_NPHY_C2_INITGAIN B43_PHY_N(0x020 + 22) /* Core 2 initial gain code */ 100#define B43_NPHY_C2_INITGAIN B43_PHY_N(0x036) /* Core 2 initial gain code */
95#define B43_NPHY_C2_INITGAIN_EXTLNA 0x0001 /* External LNA index */ 101#define B43_NPHY_C2_INITGAIN_EXTLNA 0x0001 /* External LNA index */
96#define B43_NPHY_C2_INITGAIN_LNA 0x0006 /* LNA index */ 102#define B43_NPHY_C2_INITGAIN_LNA 0x0006 /* LNA index */
97#define B43_NPHY_C2_INITGAIN_LNAIDX_SHIFT 1 103#define B43_NPHY_C2_INITGAIN_LNAIDX_SHIFT 1
@@ -101,23 +107,23 @@
101#define B43_NPHY_C2_INITGAIN_HPVGA2_SHIFT 7 107#define B43_NPHY_C2_INITGAIN_HPVGA2_SHIFT 7
102#define B43_NPHY_C2_INITGAIN_TRRX 0x1000 /* TR RX index */ 108#define B43_NPHY_C2_INITGAIN_TRRX 0x1000 /* TR RX index */
103#define B43_NPHY_C2_INITGAIN_TRTX 0x2000 /* TR TX index */ 109#define B43_NPHY_C2_INITGAIN_TRTX 0x2000 /* TR TX index */
104#define B43_NPHY_C2_CLIP1_HIGAIN B43_PHY_N(0x021 + 22) /* Core 2 clip1 high gain code */ 110#define B43_NPHY_C2_CLIP1_HIGAIN B43_PHY_N(0x037) /* Core 2 clip1 high gain code */
105#define B43_NPHY_C2_CLIP1_MEDGAIN B43_PHY_N(0x022 + 22) /* Core 2 clip1 medium gain code */ 111#define B43_NPHY_C2_CLIP1_MEDGAIN B43_PHY_N(0x038) /* Core 2 clip1 medium gain code */
106#define B43_NPHY_C2_CLIP1_LOGAIN B43_PHY_N(0x023 + 22) /* Core 2 clip1 low gain code */ 112#define B43_NPHY_C2_CLIP1_LOGAIN B43_PHY_N(0x039) /* Core 2 clip1 low gain code */
107#define B43_NPHY_C2_CLIP2_GAIN B43_PHY_N(0x024 + 22) /* Core 2 clip2 gain code */ 113#define B43_NPHY_C2_CLIP2_GAIN B43_PHY_N(0x03A) /* Core 2 clip2 gain code */
108#define B43_NPHY_C2_FILTERGAIN B43_PHY_N(0x025 + 22) /* Core 2 filter gain */ 114#define B43_NPHY_C2_FILTERGAIN B43_PHY_N(0x03B) /* Core 2 filter gain */
109#define B43_NPHY_C2_LPF_QHPF_BW B43_PHY_N(0x026 + 22) /* Core 2 LPF Q HP F bandwidth */ 115#define B43_NPHY_C2_LPF_QHPF_BW B43_PHY_N(0x03C) /* Core 2 LPF Q HP F bandwidth */
110#define B43_NPHY_C2_CLIPWBTHRES B43_PHY_N(0x027 + 22) /* Core 2 clip wideband threshold */ 116#define B43_NPHY_C2_CLIPWBTHRES B43_PHY_N(0x03D) /* Core 2 clip wideband threshold */
111#define B43_NPHY_C2_CLIPWBTHRES_CLIP2 0x003F /* Clip 2 */ 117#define B43_NPHY_C2_CLIPWBTHRES_CLIP2 0x003F /* Clip 2 */
112#define B43_NPHY_C2_CLIPWBTHRES_CLIP2_SHIFT 0 118#define B43_NPHY_C2_CLIPWBTHRES_CLIP2_SHIFT 0
113#define B43_NPHY_C2_CLIPWBTHRES_CLIP1 0x0FC0 /* Clip 1 */ 119#define B43_NPHY_C2_CLIPWBTHRES_CLIP1 0x0FC0 /* Clip 1 */
114#define B43_NPHY_C2_CLIPWBTHRES_CLIP1_SHIFT 6 120#define B43_NPHY_C2_CLIPWBTHRES_CLIP1_SHIFT 6
115#define B43_NPHY_C2_W1THRES B43_PHY_N(0x028 + 22) /* Core 2 W1 threshold */ 121#define B43_NPHY_C2_W1THRES B43_PHY_N(0x03E) /* Core 2 W1 threshold */
116#define B43_NPHY_C2_EDTHRES B43_PHY_N(0x029 + 22) /* Core 2 ED threshold */ 122#define B43_NPHY_C2_EDTHRES B43_PHY_N(0x03F) /* Core 2 ED threshold */
117#define B43_NPHY_C2_SMSIGTHRES B43_PHY_N(0x02A + 22) /* Core 2 small sig threshold */ 123#define B43_NPHY_C2_SMSIGTHRES B43_PHY_N(0x040) /* Core 2 small sig threshold */
118#define B43_NPHY_C2_NBCLIPTHRES B43_PHY_N(0x02B + 22) /* Core 2 NB clip threshold */ 124#define B43_NPHY_C2_NBCLIPTHRES B43_PHY_N(0x041) /* Core 2 NB clip threshold */
119#define B43_NPHY_C2_CLIP1THRES B43_PHY_N(0x02C + 22) /* Core 2 clip1 threshold */ 125#define B43_NPHY_C2_CLIP1THRES B43_PHY_N(0x042) /* Core 2 clip1 threshold */
120#define B43_NPHY_C2_CLIP2THRES B43_PHY_N(0x02D + 22) /* Core 2 clip2 threshold */ 126#define B43_NPHY_C2_CLIP2THRES B43_PHY_N(0x043) /* Core 2 clip2 threshold */
121 127
122#define B43_NPHY_CRS_THRES1 B43_PHY_N(0x044) /* CRS threshold 1 */ 128#define B43_NPHY_CRS_THRES1 B43_PHY_N(0x044) /* CRS threshold 1 */
123#define B43_NPHY_CRS_THRES2 B43_PHY_N(0x045) /* CRS threshold 2 */ 129#define B43_NPHY_CRS_THRES2 B43_PHY_N(0x045) /* CRS threshold 2 */
@@ -225,7 +231,7 @@
225#define B43_NPHY_C2_TXIQ_COMP_OFF B43_PHY_N(0x088) /* Core 2 TX I/Q comp offset */ 231#define B43_NPHY_C2_TXIQ_COMP_OFF B43_PHY_N(0x088) /* Core 2 TX I/Q comp offset */
226#define B43_NPHY_C1_TXCTL B43_PHY_N(0x08B) /* Core 1 TX control */ 232#define B43_NPHY_C1_TXCTL B43_PHY_N(0x08B) /* Core 1 TX control */
227#define B43_NPHY_C2_TXCTL B43_PHY_N(0x08C) /* Core 2 TX control */ 233#define B43_NPHY_C2_TXCTL B43_PHY_N(0x08C) /* Core 2 TX control */
228#define B43_NPHY_SCRAM_SIGCTL B43_PHY_N(0x090) /* Scran signal control */ 234#define B43_NPHY_SCRAM_SIGCTL B43_PHY_N(0x090) /* Scram signal control */
229#define B43_NPHY_SCRAM_SIGCTL_INITST 0x007F /* Initial state value */ 235#define B43_NPHY_SCRAM_SIGCTL_INITST 0x007F /* Initial state value */
230#define B43_NPHY_SCRAM_SIGCTL_INITST_SHIFT 0 236#define B43_NPHY_SCRAM_SIGCTL_INITST_SHIFT 0
231#define B43_NPHY_SCRAM_SIGCTL_SCM 0x0080 /* Scram control mode */ 237#define B43_NPHY_SCRAM_SIGCTL_SCM 0x0080 /* Scram control mode */