diff options
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg.h | 145 |
1 files changed, 144 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index 6592c07ac646..87cac8eb7834 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h | |||
@@ -696,9 +696,12 @@ | |||
696 | #define AR_WA_BIT7 (1 << 7) | 696 | #define AR_WA_BIT7 (1 << 7) |
697 | #define AR_WA_BIT23 (1 << 23) | 697 | #define AR_WA_BIT23 (1 << 23) |
698 | #define AR_WA_D3_L1_DISABLE (1 << 14) | 698 | #define AR_WA_D3_L1_DISABLE (1 << 14) |
699 | #define AR_WA_UNTIE_RESET_EN (1 << 15) /* Enable PCI Reset | ||
700 | to POR (power-on-reset) */ | ||
699 | #define AR_WA_D3_TO_L1_DISABLE_REAL (1 << 16) | 701 | #define AR_WA_D3_TO_L1_DISABLE_REAL (1 << 16) |
700 | #define AR_WA_ASPM_TIMER_BASED_DISABLE (1 << 17) | 702 | #define AR_WA_ASPM_TIMER_BASED_DISABLE (1 << 17) |
701 | #define AR_WA_RESET_EN (1 << 18) /* Sw Control to enable PCI-Reset to POR (bit 15) */ | 703 | #define AR_WA_RESET_EN (1 << 18) /* Enable PCI-Reset to |
704 | POR (bit 15) */ | ||
702 | #define AR_WA_ANALOG_SHIFT (1 << 20) | 705 | #define AR_WA_ANALOG_SHIFT (1 << 20) |
703 | #define AR_WA_POR_SHORT (1 << 21) /* PCI-E Phy reset control */ | 706 | #define AR_WA_POR_SHORT (1 << 21) /* PCI-E Phy reset control */ |
704 | #define AR_WA_BIT22 (1 << 22) | 707 | #define AR_WA_BIT22 (1 << 22) |
@@ -1032,6 +1035,8 @@ enum { | |||
1032 | #define AR_PCIE_PM_CTRL (AR_SREV_9340(ah) ? 0x4004 : 0x4014) | 1035 | #define AR_PCIE_PM_CTRL (AR_SREV_9340(ah) ? 0x4004 : 0x4014) |
1033 | #define AR_PCIE_PM_CTRL_ENA 0x00080000 | 1036 | #define AR_PCIE_PM_CTRL_ENA 0x00080000 |
1034 | 1037 | ||
1038 | #define AR_PCIE_PHY_REG3 0x18c08 | ||
1039 | |||
1035 | #define AR_NUM_GPIO 14 | 1040 | #define AR_NUM_GPIO 14 |
1036 | #define AR928X_NUM_GPIO 10 | 1041 | #define AR928X_NUM_GPIO 10 |
1037 | #define AR9285_NUM_GPIO 12 | 1042 | #define AR9285_NUM_GPIO 12 |
@@ -1235,6 +1240,8 @@ enum { | |||
1235 | #define AR_RTC_PLL_CLKSEL 0x00000300 | 1240 | #define AR_RTC_PLL_CLKSEL 0x00000300 |
1236 | #define AR_RTC_PLL_CLKSEL_S 8 | 1241 | #define AR_RTC_PLL_CLKSEL_S 8 |
1237 | #define AR_RTC_PLL_BYPASS 0x00010000 | 1242 | #define AR_RTC_PLL_BYPASS 0x00010000 |
1243 | #define AR_RTC_PLL_NOPWD 0x00040000 | ||
1244 | #define AR_RTC_PLL_NOPWD_S 18 | ||
1238 | 1245 | ||
1239 | #define PLL3 0x16188 | 1246 | #define PLL3 0x16188 |
1240 | #define PLL3_DO_MEAS_MASK 0x40000000 | 1247 | #define PLL3_DO_MEAS_MASK 0x40000000 |
@@ -1887,6 +1894,8 @@ enum { | |||
1887 | #define AR_PCU_MISC_MODE2_HWWAR2 0x02000000 | 1894 | #define AR_PCU_MISC_MODE2_HWWAR2 0x02000000 |
1888 | #define AR_PCU_MISC_MODE2_RESERVED2 0xFFFE0000 | 1895 | #define AR_PCU_MISC_MODE2_RESERVED2 0xFFFE0000 |
1889 | 1896 | ||
1897 | #define AR_PCU_MISC_MODE3 0x83d0 | ||
1898 | |||
1890 | #define AR_MAC_PCU_ASYNC_FIFO_REG3 0x8358 | 1899 | #define AR_MAC_PCU_ASYNC_FIFO_REG3 0x8358 |
1891 | #define AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL 0x00000400 | 1900 | #define AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL 0x00000400 |
1892 | #define AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET 0x80000000 | 1901 | #define AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET 0x80000000 |
@@ -1909,6 +1918,140 @@ enum { | |||
1909 | #define AR_RATE_DURATION_32 0x8780 | 1918 | #define AR_RATE_DURATION_32 0x8780 |
1910 | #define AR_RATE_DURATION(_n) (AR_RATE_DURATION_0 + ((_n)<<2)) | 1919 | #define AR_RATE_DURATION(_n) (AR_RATE_DURATION_0 + ((_n)<<2)) |
1911 | 1920 | ||
1921 | /* WoW - Wake On Wireless */ | ||
1922 | |||
1923 | #define AR_PMCTRL_AUX_PWR_DET 0x10000000 /* Puts Chip in L2 state */ | ||
1924 | #define AR_PMCTRL_D3COLD_VAUX 0x00800000 | ||
1925 | #define AR_PMCTRL_HOST_PME_EN 0x00400000 /* Send OOB WAKE_L on WoW | ||
1926 | event */ | ||
1927 | #define AR_PMCTRL_WOW_PME_CLR 0x00200000 /* Clear WoW event */ | ||
1928 | #define AR_PMCTRL_PWR_STATE_MASK 0x0f000000 /* Power State Mask */ | ||
1929 | #define AR_PMCTRL_PWR_STATE_D1D3 0x0f000000 /* Activate D1 and D3 */ | ||
1930 | #define AR_PMCTRL_PWR_STATE_D1D3_REAL 0x0f000000 /* Activate D1 and D3 */ | ||
1931 | #define AR_PMCTRL_PWR_STATE_D0 0x08000000 /* Activate D0 */ | ||
1932 | #define AR_PMCTRL_PWR_PM_CTRL_ENA 0x00008000 /* Enable power mgmt */ | ||
1933 | |||
1934 | #define AR_WOW_BEACON_TIMO_MAX 0xffffffff | ||
1935 | |||
1936 | /* | ||
1937 | * MAC WoW Registers | ||
1938 | */ | ||
1939 | |||
1940 | #define AR_WOW_PATTERN 0x825C | ||
1941 | #define AR_WOW_COUNT 0x8260 | ||
1942 | #define AR_WOW_BCN_EN 0x8270 | ||
1943 | #define AR_WOW_BCN_TIMO 0x8274 | ||
1944 | #define AR_WOW_KEEP_ALIVE_TIMO 0x8278 | ||
1945 | #define AR_WOW_KEEP_ALIVE 0x827c | ||
1946 | #define AR_WOW_US_SCALAR 0x8284 | ||
1947 | #define AR_WOW_KEEP_ALIVE_DELAY 0x8288 | ||
1948 | #define AR_WOW_PATTERN_MATCH 0x828c | ||
1949 | #define AR_WOW_PATTERN_OFF1 0x8290 /* pattern bytes 0 -> 3 */ | ||
1950 | #define AR_WOW_PATTERN_OFF2 0x8294 /* pattern bytes 4 -> 7 */ | ||
1951 | |||
1952 | /* for AR9285 or later version of chips */ | ||
1953 | #define AR_WOW_EXACT 0x829c | ||
1954 | #define AR_WOW_LENGTH1 0x8360 | ||
1955 | #define AR_WOW_LENGTH2 0X8364 | ||
1956 | /* register to enable match for less than 256 bytes packets */ | ||
1957 | #define AR_WOW_PATTERN_MATCH_LT_256B 0x8368 | ||
1958 | |||
1959 | #define AR_SW_WOW_CONTROL 0x20018 | ||
1960 | #define AR_SW_WOW_ENABLE 0x1 | ||
1961 | #define AR_SWITCH_TO_REFCLK 0x2 | ||
1962 | #define AR_RESET_CONTROL 0x4 | ||
1963 | #define AR_RESET_VALUE_MASK 0x8 | ||
1964 | #define AR_HW_WOW_DISABLE 0x10 | ||
1965 | #define AR_CLR_MAC_INTERRUPT 0x20 | ||
1966 | #define AR_CLR_KA_INTERRUPT 0x40 | ||
1967 | |||
1968 | /* AR_WOW_PATTERN register values */ | ||
1969 | #define AR_WOW_BACK_OFF_SHIFT(x) ((x & 0xf) << 28) /* in usecs */ | ||
1970 | #define AR_WOW_MAC_INTR_EN 0x00040000 | ||
1971 | #define AR_WOW_MAGIC_EN 0x00010000 | ||
1972 | #define AR_WOW_PATTERN_EN(x) (x & 0xff) | ||
1973 | #define AR_WOW_PAT_FOUND_SHIFT 8 | ||
1974 | #define AR_WOW_PATTERN_FOUND(x) (x & (0xff << AR_WOW_PAT_FOUND_SHIFT)) | ||
1975 | #define AR_WOW_PATTERN_FOUND_MASK ((0xff) << AR_WOW_PAT_FOUND_SHIFT) | ||
1976 | #define AR_WOW_MAGIC_PAT_FOUND 0x00020000 | ||
1977 | #define AR_WOW_MAC_INTR 0x00080000 | ||
1978 | #define AR_WOW_KEEP_ALIVE_FAIL 0x00100000 | ||
1979 | #define AR_WOW_BEACON_FAIL 0x00200000 | ||
1980 | |||
1981 | #define AR_WOW_STATUS(x) (x & (AR_WOW_PATTERN_FOUND_MASK | \ | ||
1982 | AR_WOW_MAGIC_PAT_FOUND | \ | ||
1983 | AR_WOW_KEEP_ALIVE_FAIL | \ | ||
1984 | AR_WOW_BEACON_FAIL)) | ||
1985 | #define AR_WOW_CLEAR_EVENTS(x) (x & ~(AR_WOW_PATTERN_EN(0xff) | \ | ||
1986 | AR_WOW_MAGIC_EN | \ | ||
1987 | AR_WOW_MAC_INTR_EN | \ | ||
1988 | AR_WOW_BEACON_FAIL | \ | ||
1989 | AR_WOW_KEEP_ALIVE_FAIL)) | ||
1990 | |||
1991 | /* AR_WOW_COUNT register values */ | ||
1992 | #define AR_WOW_AIFS_CNT(x) (x & 0xff) | ||
1993 | #define AR_WOW_SLOT_CNT(x) ((x & 0xff) << 8) | ||
1994 | #define AR_WOW_KEEP_ALIVE_CNT(x) ((x & 0xff) << 16) | ||
1995 | |||
1996 | /* AR_WOW_BCN_EN register */ | ||
1997 | #define AR_WOW_BEACON_FAIL_EN 0x00000001 | ||
1998 | |||
1999 | /* AR_WOW_BCN_TIMO rgister */ | ||
2000 | #define AR_WOW_BEACON_TIMO 0x40000000 /* valid if BCN_EN is set */ | ||
2001 | |||
2002 | /* AR_WOW_KEEP_ALIVE_TIMO register */ | ||
2003 | #define AR_WOW_KEEP_ALIVE_TIMO_VALUE | ||
2004 | #define AR_WOW_KEEP_ALIVE_NEVER 0xffffffff | ||
2005 | |||
2006 | /* AR_WOW_KEEP_ALIVE register */ | ||
2007 | #define AR_WOW_KEEP_ALIVE_AUTO_DIS 0x00000001 | ||
2008 | #define AR_WOW_KEEP_ALIVE_FAIL_DIS 0x00000002 | ||
2009 | |||
2010 | /* AR_WOW_KEEP_ALIVE_DELAY register */ | ||
2011 | #define AR_WOW_KEEP_ALIVE_DELAY_VALUE 0x000003e8 /* 1 msec */ | ||
2012 | |||
2013 | |||
2014 | /* | ||
2015 | * keep it long for beacon workaround - ensure no false alarm | ||
2016 | */ | ||
2017 | #define AR_WOW_BMISSTHRESHOLD 0x20 | ||
2018 | |||
2019 | /* AR_WOW_PATTERN_MATCH register */ | ||
2020 | #define AR_WOW_PAT_END_OF_PKT(x) (x & 0xf) | ||
2021 | #define AR_WOW_PAT_OFF_MATCH(x) ((x & 0xf) << 8) | ||
2022 | |||
2023 | /* | ||
2024 | * default values for Wow Configuration for backoff, aifs, slot, keep-alive | ||
2025 | * to be programmed into various registers. | ||
2026 | */ | ||
2027 | #define AR_WOW_PAT_BACKOFF 0x00000004 /* AR_WOW_PATTERN_REG */ | ||
2028 | #define AR_WOW_CNT_AIFS_CNT 0x00000022 /* AR_WOW_COUNT_REG */ | ||
2029 | #define AR_WOW_CNT_SLOT_CNT 0x00000009 /* AR_WOW_COUNT_REG */ | ||
2030 | /* | ||
2031 | * Keepalive count applicable for AR9280 2.0 and above. | ||
2032 | */ | ||
2033 | #define AR_WOW_CNT_KA_CNT 0x00000008 /* AR_WOW_COUNT register */ | ||
2034 | |||
2035 | /* WoW - Transmit buffer for keep alive frames */ | ||
2036 | #define AR_WOW_TRANSMIT_BUFFER 0xe000 /* E000 - EFFC */ | ||
2037 | |||
2038 | #define AR_WOW_TXBUF(i) (AR_WOW_TRANSMIT_BUFFER + ((i) << 2)) | ||
2039 | |||
2040 | #define AR_WOW_KA_DESC_WORD2 0xe000 | ||
2041 | |||
2042 | #define AR_WOW_KA_DATA_WORD0 0xe030 | ||
2043 | |||
2044 | /* WoW Transmit Buffer for patterns */ | ||
2045 | #define AR_WOW_TB_PATTERN(i) (0xe100 + (i << 8)) | ||
2046 | #define AR_WOW_TB_MASK(i) (0xec00 + (i << 5)) | ||
2047 | |||
2048 | /* Currently Pattern 0-7 are supported - so bit 0-7 are set */ | ||
2049 | #define AR_WOW_PATTERN_SUPPORTED 0xff | ||
2050 | #define AR_WOW_LENGTH_MAX 0xff | ||
2051 | #define AR_WOW_LEN1_SHIFT(_i) ((0x3 - ((_i) & 0x3)) << 0x3) | ||
2052 | #define AR_WOW_LENGTH1_MASK(_i) (AR_WOW_LENGTH_MAX << AR_WOW_LEN1_SHIFT(_i)) | ||
2053 | #define AR_WOW_LEN2_SHIFT(_i) ((0x7 - ((_i) & 0x7)) << 0x3) | ||
2054 | #define AR_WOW_LENGTH2_MASK(_i) (AR_WOW_LENGTH_MAX << AR_WOW_LEN2_SHIFT(_i)) | ||
1912 | 2055 | ||
1913 | #define AR9271_CORE_CLOCK 117 /* clock to 117Mhz */ | 2056 | #define AR9271_CORE_CLOCK 117 /* clock to 117Mhz */ |
1914 | #define AR9271_TARGET_BAUD_RATE 19200 /* 115200 */ | 2057 | #define AR9271_TARGET_BAUD_RATE 19200 /* 115200 */ |