aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/reg.h
diff options
context:
space:
mode:
authorNick Kossifidis <mick@madwifi-project.org>2009-02-08 23:12:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:44:49 -0500
commite8f055f0c3ba226ca599c14c2e5fe829f6f57cbb (patch)
tree02479a6c4aaa388b13866f0fb596433630863083 /drivers/net/wireless/ath5k/reg.h
parenta406c139091902acebafb2462b64ba498901e820 (diff)
ath5k: Update reset code
* Update reset and sync with HALs * Clean up eeprom settings and tweaking of initvals and put them on separate functions * Set/Restore 32KHz ref clk operation * Add some more documentation TODO: Spur mitigation, tpc, half/quarter rate, compression etc v2: Address comments from Bob and Felix and fix RSSI threshold bug introduced on the first version of the patch Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/reg.h')
-rw-r--r--drivers/net/wireless/ath5k/reg.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath5k/reg.h b/drivers/net/wireless/ath5k/reg.h
index 84f4669278a7..2dc008e10226 100644
--- a/drivers/net/wireless/ath5k/reg.h
+++ b/drivers/net/wireless/ath5k/reg.h
@@ -187,6 +187,7 @@
187#define AR5K_TXCFG_FRMPAD_DIS 0x00002000 /* [5211+] */ 187#define AR5K_TXCFG_FRMPAD_DIS 0x00002000 /* [5211+] */
188#define AR5K_TXCFG_RDY_CBR_DIS 0x00004000 /* Ready time CBR disable [5211+] */ 188#define AR5K_TXCFG_RDY_CBR_DIS 0x00004000 /* Ready time CBR disable [5211+] */
189#define AR5K_TXCFG_JUMBO_FRM_MODE 0x00008000 /* Jumbo frame mode [5211+] */ 189#define AR5K_TXCFG_JUMBO_FRM_MODE 0x00008000 /* Jumbo frame mode [5211+] */
190#define AR5K_TXCFG_DCU_DBL_BUF_DIS 0x00008000 /* Disable double buffering on DCU */
190#define AR5K_TXCFG_DCU_CACHING_DIS 0x00010000 /* Disable DCU caching */ 191#define AR5K_TXCFG_DCU_CACHING_DIS 0x00010000 /* Disable DCU caching */
191 192
192/* 193/*
@@ -753,7 +754,7 @@
753 */ 754 */
754#define AR5K_DCU_SEQNUM_BASE 0x1140 755#define AR5K_DCU_SEQNUM_BASE 0x1140
755#define AR5K_DCU_SEQNUM_M 0x00000fff 756#define AR5K_DCU_SEQNUM_M 0x00000fff
756#define AR5K_QUEUE_DFS_SEQNUM(_q) AR5K_QUEUE_REG(AR5K_DCU_SEQNUM_BASE, _q) 757#define AR5K_QUEUE_DCU_SEQNUM(_q) AR5K_QUEUE_REG(AR5K_DCU_SEQNUM_BASE, _q)
757 758
758/* 759/*
759 * DCU global IFS SIFS register 760 * DCU global IFS SIFS register
@@ -1467,7 +1468,7 @@
1467#define AR5K_ADDAC_TEST_TRIG_PTY 0x00020000 /* Trigger polarity */ 1468#define AR5K_ADDAC_TEST_TRIG_PTY 0x00020000 /* Trigger polarity */
1468#define AR5K_ADDAC_TEST_RXCONT 0x00040000 /* Continuous capture */ 1469#define AR5K_ADDAC_TEST_RXCONT 0x00040000 /* Continuous capture */
1469#define AR5K_ADDAC_TEST_CAPTURE 0x00080000 /* Begin capture */ 1470#define AR5K_ADDAC_TEST_CAPTURE 0x00080000 /* Begin capture */
1470#define AR5K_ADDAC_TEST_TST_ARM 0x00100000 /* Test ARM (Adaptive Radio Mode ?) */ 1471#define AR5K_ADDAC_TEST_TST_ARM 0x00100000 /* ARM rx buffer for capture */
1471 1472
1472/* 1473/*
1473 * Default antenna register [5211+] 1474 * Default antenna register [5211+]
@@ -1679,7 +1680,7 @@
1679 * TSF parameter register 1680 * TSF parameter register
1680 */ 1681 */
1681#define AR5K_TSF_PARM 0x8104 /* Register Address */ 1682#define AR5K_TSF_PARM 0x8104 /* Register Address */
1682#define AR5K_TSF_PARM_INC_M 0x000000ff /* Mask for TSF increment */ 1683#define AR5K_TSF_PARM_INC 0x000000ff /* Mask for TSF increment */
1683#define AR5K_TSF_PARM_INC_S 0 1684#define AR5K_TSF_PARM_INC_S 0
1684 1685
1685/* 1686/*
@@ -1691,7 +1692,7 @@
1691#define AR5K_QOS_NOACK_BIT_OFFSET 0x00000070 /* ??? */ 1692#define AR5K_QOS_NOACK_BIT_OFFSET 0x00000070 /* ??? */
1692#define AR5K_QOS_NOACK_BIT_OFFSET_S 4 1693#define AR5K_QOS_NOACK_BIT_OFFSET_S 4
1693#define AR5K_QOS_NOACK_BYTE_OFFSET 0x00000180 /* ??? */ 1694#define AR5K_QOS_NOACK_BYTE_OFFSET 0x00000180 /* ??? */
1694#define AR5K_QOS_NOACK_BYTE_OFFSET_S 8 1695#define AR5K_QOS_NOACK_BYTE_OFFSET_S 7
1695 1696
1696/* 1697/*
1697 * PHY error filter register 1698 * PHY error filter register
@@ -1850,15 +1851,14 @@
1850 * TST_2 (Misc config parameters) 1851 * TST_2 (Misc config parameters)
1851 */ 1852 */
1852#define AR5K_PHY_TST2 0x9800 /* Register Address */ 1853#define AR5K_PHY_TST2 0x9800 /* Register Address */
1853#define AR5K_PHY_TST2_TRIG_SEL 0x00000001 /* Trigger select (?) (field ?) */ 1854#define AR5K_PHY_TST2_TRIG_SEL 0x00000007 /* Trigger select (?)*/
1854#define AR5K_PHY_TST2_TRIG 0x00000010 /* Trigger (?) (field ?) */ 1855#define AR5K_PHY_TST2_TRIG 0x00000010 /* Trigger (?) */
1855#define AR5K_PHY_TST2_CBUS_MODE 0x00000100 /* Cardbus mode (?) */ 1856#define AR5K_PHY_TST2_CBUS_MODE 0x00000060 /* Cardbus mode (?) */
1856/* bit reserved */
1857#define AR5K_PHY_TST2_CLK32 0x00000400 /* CLK_OUT is CLK32 (32Khz external) */ 1857#define AR5K_PHY_TST2_CLK32 0x00000400 /* CLK_OUT is CLK32 (32Khz external) */
1858#define AR5K_PHY_TST2_CHANCOR_DUMP_EN 0x00000800 /* Enable Chancor dump (?) */ 1858#define AR5K_PHY_TST2_CHANCOR_DUMP_EN 0x00000800 /* Enable Chancor dump (?) */
1859#define AR5K_PHY_TST2_EVEN_CHANCOR_DUMP 0x00001000 /* Even Chancor dump (?) */ 1859#define AR5K_PHY_TST2_EVEN_CHANCOR_DUMP 0x00001000 /* Even Chancor dump (?) */
1860#define AR5K_PHY_TST2_RFSILENT_EN 0x00002000 /* Enable RFSILENT */ 1860#define AR5K_PHY_TST2_RFSILENT_EN 0x00002000 /* Enable RFSILENT */
1861#define AR5K_PHY_TST2_ALT_RFDATA 0x00004000 /* Alternate RFDATA (5-2GHz switch) */ 1861#define AR5K_PHY_TST2_ALT_RFDATA 0x00004000 /* Alternate RFDATA (5-2GHz switch ?) */
1862#define AR5K_PHY_TST2_MINI_OBS_EN 0x00008000 /* Enable mini OBS (?) */ 1862#define AR5K_PHY_TST2_MINI_OBS_EN 0x00008000 /* Enable mini OBS (?) */
1863#define AR5K_PHY_TST2_RX2_IS_RX5_INV 0x00010000 /* 2GHz rx path is the 5GHz path inverted (?) */ 1863#define AR5K_PHY_TST2_RX2_IS_RX5_INV 0x00010000 /* 2GHz rx path is the 5GHz path inverted (?) */
1864#define AR5K_PHY_TST2_SLOW_CLK160 0x00020000 /* Slow CLK160 (?) */ 1864#define AR5K_PHY_TST2_SLOW_CLK160 0x00020000 /* Slow CLK160 (?) */
@@ -1928,8 +1928,8 @@
1928#define AR5K_PHY_RF_CTL2_TXF2TXD_START_S 0 1928#define AR5K_PHY_RF_CTL2_TXF2TXD_START_S 0
1929 1929
1930#define AR5K_PHY_RF_CTL3 0x9828 /* Register Address */ 1930#define AR5K_PHY_RF_CTL3 0x9828 /* Register Address */
1931#define AR5K_PHY_RF_CTL3_TXE2XLNA_ON 0x0000000f /* TX end to XLNA on */ 1931#define AR5K_PHY_RF_CTL3_TXE2XLNA_ON 0x0000ff00 /* TX end to XLNA on */
1932#define AR5K_PHY_RF_CTL3_TXE2XLNA_ON_S 0 1932#define AR5K_PHY_RF_CTL3_TXE2XLNA_ON_S 8
1933 1933
1934#define AR5K_PHY_ADC_CTL 0x982c 1934#define AR5K_PHY_ADC_CTL 0x982c
1935#define AR5K_PHY_ADC_CTL_INBUFGAIN_OFF 0x00000003 1935#define AR5K_PHY_ADC_CTL_INBUFGAIN_OFF 0x00000003
@@ -1963,7 +1963,7 @@
1963#define AR5K_PHY_SETTLING_AGC 0x0000007f /* AGC settling time */ 1963#define AR5K_PHY_SETTLING_AGC 0x0000007f /* AGC settling time */
1964#define AR5K_PHY_SETTLING_AGC_S 0 1964#define AR5K_PHY_SETTLING_AGC_S 0
1965#define AR5K_PHY_SETTLING_SWITCH 0x00003f80 /* Switch settlig time */ 1965#define AR5K_PHY_SETTLING_SWITCH 0x00003f80 /* Switch settlig time */
1966#define AR5K_PHY_SETTLINK_SWITCH_S 7 1966#define AR5K_PHY_SETTLING_SWITCH_S 7
1967 1967
1968/* 1968/*
1969 * PHY Gain registers 1969 * PHY Gain registers
@@ -2069,14 +2069,14 @@
2069 * PHY sleep registers [5112+] 2069 * PHY sleep registers [5112+]
2070 */ 2070 */
2071#define AR5K_PHY_SCR 0x9870 2071#define AR5K_PHY_SCR 0x9870
2072#define AR5K_PHY_SCR_32MHZ 0x0000001f
2073 2072
2074#define AR5K_PHY_SLMT 0x9874 2073#define AR5K_PHY_SLMT 0x9874
2075#define AR5K_PHY_SLMT_32MHZ 0x0000007f 2074#define AR5K_PHY_SLMT_32MHZ 0x0000007f
2076 2075
2077#define AR5K_PHY_SCAL 0x9878 2076#define AR5K_PHY_SCAL 0x9878
2078#define AR5K_PHY_SCAL_32MHZ 0x0000000e 2077#define AR5K_PHY_SCAL_32MHZ 0x0000000e
2079 2078#define AR5K_PHY_SCAL_32MHZ_2417 0x0000000a
2079#define AR5K_PHY_SCAL_32MHZ_HB63 0x00000032
2080 2080
2081/* 2081/*
2082 * PHY PLL (Phase Locked Loop) control register 2082 * PHY PLL (Phase Locked Loop) control register
@@ -2156,7 +2156,8 @@
2156#define AR5K_PHY_ANT_CTL_TXRX_EN 0x00000001 /* Enable TX/RX (?) */ 2156#define AR5K_PHY_ANT_CTL_TXRX_EN 0x00000001 /* Enable TX/RX (?) */
2157#define AR5K_PHY_ANT_CTL_SECTORED_ANT 0x00000004 /* Sectored Antenna */ 2157#define AR5K_PHY_ANT_CTL_SECTORED_ANT 0x00000004 /* Sectored Antenna */
2158#define AR5K_PHY_ANT_CTL_HITUNE5 0x00000008 /* Hitune5 (?) */ 2158#define AR5K_PHY_ANT_CTL_HITUNE5 0x00000008 /* Hitune5 (?) */
2159#define AR5K_PHY_ANT_CTL_SWTABLE_IDLE 0x00000010 /* Switch table idle (?) */ 2159#define AR5K_PHY_ANT_CTL_SWTABLE_IDLE 0x000003f0 /* Switch table idle (?) */
2160#define AR5K_PHY_ANT_CTL_SWTABLE_IDLE_S 4
2160 2161
2161/* 2162/*
2162 * PHY receiver delay register [5111+] 2163 * PHY receiver delay register [5111+]
@@ -2196,7 +2197,7 @@
2196#define AR5K_PHY_OFDM_SELFCORR 0x9924 /* Register Address */ 2197#define AR5K_PHY_OFDM_SELFCORR 0x9924 /* Register Address */
2197#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR1_EN 0x00000001 /* Enable cyclic RSSI thr 1 */ 2198#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR1_EN 0x00000001 /* Enable cyclic RSSI thr 1 */
2198#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR1 0x000000fe /* Mask for Cyclic RSSI threshold 1 */ 2199#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR1 0x000000fe /* Mask for Cyclic RSSI threshold 1 */
2199#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR1_S 0 2200#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR1_S 1
2200#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR3 0x00000100 /* Cyclic RSSI threshold 3 (field) (?) */ 2201#define AR5K_PHY_OFDM_SELFCORR_CYPWR_THR3 0x00000100 /* Cyclic RSSI threshold 3 (field) (?) */
2201#define AR5K_PHY_OFDM_SELFCORR_RSSI_1ATHR_EN 0x00008000 /* Enable 1A RSSI threshold (?) */ 2202#define AR5K_PHY_OFDM_SELFCORR_RSSI_1ATHR_EN 0x00008000 /* Enable 1A RSSI threshold (?) */
2202#define AR5K_PHY_OFDM_SELFCORR_RSSI_1ATHR 0x00010000 /* 1A RSSI threshold (field) (?) */ 2203#define AR5K_PHY_OFDM_SELFCORR_RSSI_1ATHR 0x00010000 /* 1A RSSI threshold (field) (?) */
@@ -2279,6 +2280,15 @@
2279 AR5K_PHY_FRAME_CTL_TIMING_ERR 2280 AR5K_PHY_FRAME_CTL_TIMING_ERR
2280 2281
2281/* 2282/*
2283 * PHY Tx Power adjustment register [5212A+]
2284 */
2285#define AR5K_PHY_TX_PWR_ADJ 0x994c
2286#define AR5K_PHY_TX_PWR_ADJ_CCK_GAIN_DELTA 0x00000fc0
2287#define AR5K_PHY_TX_PWR_ADJ_CCK_GAIN_DELTA_S 6
2288#define AR5K_PHY_TX_PWR_ADJ_CCK_PCDAC_INDEX 0x00fc0000
2289#define AR5K_PHY_TX_PWR_ADJ_CCK_PCDAC_INDEX_S 18
2290
2291/*
2282 * PHY radar detection register [5111+] 2292 * PHY radar detection register [5111+]
2283 */ 2293 */
2284#define AR5K_PHY_RADAR 0x9954 2294#define AR5K_PHY_RADAR 0x9954
@@ -2331,7 +2341,7 @@
2331#define AR5K_PHY_SIGMA_DELTA_FILT2_S 3 2341#define AR5K_PHY_SIGMA_DELTA_FILT2_S 3
2332#define AR5K_PHY_SIGMA_DELTA_FILT1 0x00001f00 2342#define AR5K_PHY_SIGMA_DELTA_FILT1 0x00001f00
2333#define AR5K_PHY_SIGMA_DELTA_FILT1_S 8 2343#define AR5K_PHY_SIGMA_DELTA_FILT1_S 8
2334#define AR5K_PHY_SIGMA_DELTA_ADC_CLIP 0x01ff3000 2344#define AR5K_PHY_SIGMA_DELTA_ADC_CLIP 0x01ffe000
2335#define AR5K_PHY_SIGMA_DELTA_ADC_CLIP_S 13 2345#define AR5K_PHY_SIGMA_DELTA_ADC_CLIP_S 13
2336 2346
2337/* 2347/*
@@ -2459,17 +2469,7 @@
2459#define AR5K_PHY_SDELAY 0x99f4 2469#define AR5K_PHY_SDELAY 0x99f4
2460#define AR5K_PHY_SDELAY_32MHZ 0x000000ff 2470#define AR5K_PHY_SDELAY_32MHZ 0x000000ff
2461#define AR5K_PHY_SPENDING 0x99f8 2471#define AR5K_PHY_SPENDING 0x99f8
2462#define AR5K_PHY_SPENDING_14 0x00000014 2472
2463#define AR5K_PHY_SPENDING_18 0x00000018
2464#define AR5K_PHY_SPENDING_RF5111 0x00000018
2465#define AR5K_PHY_SPENDING_RF5112 0x00000014
2466/* #define AR5K_PHY_SPENDING_RF5112A 0x0000000e */
2467/* #define AR5K_PHY_SPENDING_RF5424 0x00000012 */
2468#define AR5K_PHY_SPENDING_RF5413 0x00000018
2469#define AR5K_PHY_SPENDING_RF2413 0x00000018
2470#define AR5K_PHY_SPENDING_RF2316 0x00000018
2471#define AR5K_PHY_SPENDING_RF2317 0x00000018
2472#define AR5K_PHY_SPENDING_RF2425 0x00000014
2473 2473
2474/* 2474/*
2475 * PHY PAPD I (power?) table (?) 2475 * PHY PAPD I (power?) table (?)