/*
* Copyright (c) 2008 Atheros Communications Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef REG_H
#define REG_H
#define AR_CR 0x0008
#define AR_CR_RXE 0x00000004
#define AR_CR_RXD 0x00000020
#define AR_CR_SWI 0x00000040
#define AR_RXDP 0x000C
#define AR_CFG 0x0014
#define AR_CFG_SWTD 0x00000001
#define AR_CFG_SWTB 0x00000002
#define AR_CFG_SWRD 0x00000004
#define AR_CFG_SWRB 0x00000008
#define AR_CFG_SWRG 0x00000010
#define AR_CFG_AP_ADHOC_INDICATION 0x00000020
#define AR_CFG_PHOK 0x00000100
#define AR_CFG_CLK_GATE_DIS 0x00000400
#define AR_CFG_EEBS 0x00000200
#define AR_CFG_PCI_MASTER_REQ_Q_THRESH 0x00060000
#define AR_CFG_PCI_MASTER_REQ_Q_THRESH_S 17
#define AR_MIRT 0x0020
#define AR_MIRT_VAL 0x0000ffff
#define AR_MIRT_VAL_S 16
#define AR_IER 0x0024
#define AR_IER_ENABLE 0x00000001
#define AR_IER_DISABLE 0x00000000
#define AR_TIMT 0x0028
#define AR_TIMT_LAST 0x0000ffff
#define AR_TIMT_LAST_S 0
#define AR_TIMT_FIRST 0xffff0000
#define AR_TIMT_FIRST_S 16
#define AR_RIMT 0x002C
#define AR_RIMT_LAST 0x0000ffff
#define AR_RIMT_LAST_S 0
#define AR_RIMT_FIRST 0xffff0000
#define AR_RIMT_FIRST_S 16
#define AR_DMASIZE_4B 0x00000000
#define AR_DMASIZE_8B 0x00000001
#define AR_DMASIZE_16B 0x00000002
#define AR_DMASIZE_32B 0x00000003
#define AR_DMASIZE_64B 0x00000004
#define AR_DMASIZE_128B 0x00000005
#define AR_DMASIZE_256B 0x00000006
#define AR_DMASIZE_512B 0x00000007
#define AR_TXCFG 0x0030
#define AR_TXCFG_DMASZ_MASK 0x00000003
#define AR_TXCFG_DMASZ_4B 0
#define AR_TXCFG_DMASZ_8B 1
#define AR_TXCFG_DMASZ_16B 2
#define AR_TXCFG_DMASZ_32B 3
#define AR_TXCFG_DMASZ_64B 4
#define AR_TXCFG_DMASZ_128B 5
#define AR_TXCFG_DMASZ_256B 6
#define AR_TXCFG_DMASZ_512B 7
#define AR_FTRIG 0x000003F0
#define AR_FTRIG_S 4
#define AR_FTRIG_IMMED 0x00000000
#define AR_FTRIG_64B 0x00000010
#define AR_FTRIG_128B 0x00000020
#define AR_FTRIG_192B 0x00000030
#define AR_FTRIG_256B 0x00000040
#define AR_FTRIG_512B 0x00000080
#define AR_TXCFG_ADHOC_BEACON_ATIM_TX_POLICY 0x00000800
#define AR_RXCFG 0x0034
#define AR_RXCFG_CHIRP 0x00000008
#define AR_RXCFG_ZLFDMA 0x00000010
#define AR_RXCFG_DMASZ_MASK 0x00000007
#define AR_RXCFG_DMASZ_4B 0
#define AR_RXCFG_DMASZ_8B 1
#define AR_RXCFG_DMASZ_16B 2
#define AR_RXCFG_DMASZ_32B 3
#define AR_RXCFG_DMASZ_64B 4
#define AR_RXCFG_DMASZ_128B 5
#define AR_RXCFG_DMASZ_256B 6
#define AR_RXCFG_DMASZ_512B 7
#define AR_MIBC 0x0040
#define AR_MIBC_COW 0x00000001
#define AR_MIBC_FMC 0x00000002
#define AR_MIBC_CMC 0x00000004
#define AR_MIBC_MCS 0x00000008
#define AR_TOPS 0x0044
#define AR_TOPS_MASK 0x0000FFFF
#define AR_RXNPTO 0x0048
#define AR_RXNPTO_MASK 0x000003FF
#define AR_TXNPTO 0x004C
#define AR_TXNPTO_MASK 0x000003FF
#define AR_TXNPTO_QCU_MASK 0x000FFC00
#define AR_RPGTO 0x0050
#define AR_RPGTO_MASK 0x000003FF
#define AR_RPCNT 0x0054
#define AR_RPCNT_MASK 0x0000001F
#define AR_MACMISC 0x0058
#define AR_MACMISC_PCI_EXT_FORCE 0x00000010
#define AR_MACMISC_DMA_OBS 0x000001E0
#define AR_MACMISC_DMA_OBS_S 5
#define AR_MACMISC_DMA_OBS_LINE_0 0
#define AR_MACMISC_DMA_OBS_LINE_1 1
#define AR_MACMISC_DMA_OBS_LINE_2 2
#define AR_MACMISC_DMA_OBS_LINE_3 3
#define AR_MACMISC_DMA_OBS_LINE_4 4
#define AR_MACMISC_DMA_OBS_LINE_5 5
#define AR_MACMISC_DMA_OBS_LINE_6 6
#define AR_MACMISC_DMA_OBS_LINE_7 7
#define AR_MACMISC_DMA_OBS_LINE_8 8
#define AR_MACMISC_MISC_OBS 0x00000E00
#define AR_MACMISC_MISC_OBS_S 9
#define AR_MACMISC_MISC_OBS_BUS_LSB 0x00007000
#define AR_MACMISC_MISC_OBS_BUS_LSB_S 12
#define AR_MACMISC_MISC_OBS_BUS_MSB 0x00038000
#define AR_MACMISC_MISC_OBS_BUS_MSB_S 15
#define AR_MACMISC_MISC_OBS_BUS_1 1
#define AR_GTXTO 0x0064
#define AR_GTXTO_TIMEOUT_COUNTER 0x0000FFFF
#define AR_GTXTO_TIMEOUT_LIMIT 0xFFFF0000
#define AR_GTXTO_TIMEOUT_LIMIT_S 16
#define AR_GTTM 0x0068
#define AR_GTTM_USEC 0x00000001
#define AR_GTTM_IGNORE_IDLE 0x00000002
#define AR_GTTM_RESET_IDLE 0x00000004
#define AR_GTTM_CST_USEC 0x00000008
#define AR_CST 0x006C