/drivers/net/wireless/wl12xx/reg.h
C Header | 603 lines | 200 code | 96 blank | 307 comment | 0 complexity | 631ef6dbec81986350578229e277751d MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
- /*
- * This file is part of wl12xx
- *
- * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
- * Copyright (C) 2009 Nokia Corporation
- *
- * Contact: Luciano Coelho <luciano.coelho@nokia.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
- */
- #ifndef __REG_H__
- #define __REG_H__
- #include <linux/bitops.h>
- #define REGISTERS_BASE 0x00300000
- #define DRPW_BASE 0x00310000
- #define REGISTERS_DOWN_SIZE 0x00008800
- #define REGISTERS_WORK_SIZE 0x0000b000
- #define HW_ACCESS_ELP_CTRL_REG_ADDR 0x1FFFC
- #define FW_STATUS_ADDR (0x14FC0 + 0xA000)
- /* ELP register commands */
- #define ELPCTRL_WAKE_UP 0x1
- #define ELPCTRL_WAKE_UP_WLAN_READY 0x5
- #define ELPCTRL_SLEEP 0x0
- /* ELP WLAN_READY bit */
- #define ELPCTRL_WLAN_READY 0x2
- /*===============================================
- Host Software Reset - 32bit RW
- ------------------------------------------
- [31:1] Reserved
- 0 SOFT_RESET Soft Reset - When this bit is set,
- it holds the Wlan hardware in a soft reset state.
- This reset disables all MAC and baseband processor
- clocks except the CardBus/PCI interface clock.
- It also initializes all MAC state machines except
- the host interface. It does not reload the
- contents of the EEPROM. When this bit is cleared
- (not self-clearing), the Wlan hardware
- exits the software reset state.
- ===============================================*/
- #define ACX_REG_SLV_SOFT_RESET (REGISTERS_BASE + 0x0000)
- #define WL1271_SLV_REG_DATA (REGISTERS_BASE + 0x0008)
- #define WL1271_SLV_REG_ADATA (REGISTERS_BASE + 0x000c)
- #define WL1271_SLV_MEM_DATA (REGISTERS_BASE + 0x0018)
- #define ACX_REG_INTERRUPT_TRIG (REGISTERS_BASE + 0x0474)
- #define ACX_REG_INTERRUPT_TRIG_H (REGISTERS_BASE + 0x0478)
- /*=============================================
- Host Interrupt Mask Register - 32bit (RW)
- ------------------------------------------
- Setting a bit in this register masks the
- corresponding interrupt to the host.
- 0 - RX0 - Rx first dubble buffer Data Interrupt
- 1 - TXD - Tx Data Interrupt
- 2 - TXXFR - Tx Transfer Interrupt
- 3 - RX1 - Rx second dubble buffer Data Interrupt
- 4 - RXXFR - Rx Transfer Interrupt
- 5 - EVENT_A - Event Mailbox interrupt
- 6 - EVENT_B - Event Mailbox interrupt
- 7 - WNONHST - Wake On Host Interrupt
- 8 - TRACE_A - Debug Trace interrupt
- 9 - TRACE_B - Debug Trace interrupt
- 10 - CDCMP - Command Complete Interrupt
- 11 -
- 12 -
- 13 -
- 14 - ICOMP - Initialization Complete Interrupt
- 16 - SG SE - Soft Gemini - Sense enable interrupt
- 17 - SG SD - Soft Gemini - Sense disable interrupt
- 18 - -
- 19 - -
- 20 - -
- 21- -
- Default: 0x0001
- *==============================================*/
- #define ACX_REG_INTERRUPT_MASK (REGISTERS_BASE + 0x04DC)
- /*=============================================
- Host Interrupt Mask Set 16bit, (Write only)
- ------------------------------------------
- Setting a bit in this register sets
- the corresponding bin in ACX_HINT_MASK register
- without effecting the mask
- state of other bits (0 = no effect).
- ==============================================*/
- #define ACX_REG_HINT_MASK_SET (REGISTERS_BASE + 0x04E0)
- /*=============================================
- Host Interrupt Mask Clear 16bit,(Write only)
- ------------------------------------------
- Setting a bit in this register clears
- the corresponding bin in ACX_HINT_MASK register
- without effecting the mask
- state of other bits (0 = no effect).
- =============================================*/
- #define ACX_REG_HINT_MASK_CLR (REGISTERS_BASE + 0x04E4)
- /*=============================================
- Host Interrupt Status Nondestructive Read
- 16bit,(Read only)
- ------------------------------------------
- The host can read this register to determine
- which interrupts are active.
- Reading this register doesn't
- effect its content.
- =============================================*/
- #define ACX_REG_INTERRUPT_NO_CLEAR (REGISTERS_BASE + 0x04E8)
- /*=============================================
- Host Interrupt Status Clear on Read Register
- 16bit,(Read only)
- ------------------------------------------
- The host can read this register to determine
- which interrupts are active.
- Reading this register clears it,
- thus making all interrupts inactive.
- ==============================================*/
- #define ACX_REG_INTERRUPT_CLEAR (REGISTERS_BASE + 0x04F8)
- /*=============================================
- Host Interrupt Acknowledge Register
- 16bit,(Write only)
- ------------------------------------------
- The host can set individual bits in this
- register to clear (acknowledge) the corresp.
- interrupt status bits in the HINT_STS_CLR and
- HINT_STS_ND registers, thus making the
- assotiated interrupt inactive. (0-no effect)
- ==============================================*/
- #define ACX_REG_INTERRUPT_ACK (REGISTERS_BASE + 0x04F0)
- #define RX_DRIVER_COUNTER_ADDRESS (REGISTERS_BASE + 0x0538)
- /* Device Configuration registers*/
- #define SOR_CFG (REGISTERS_BASE + 0x0800)
- /* Embedded ARM CPU Control */
- /*===============================================
- Halt eCPU - 32bit RW
- ------------------------------------------
- 0 HALT_ECPU Halt Embedded CPU - This bit is the
- compliment of bit 1 (MDATA2) in the SOR_CFG register.
- During a hardware reset, this bit holds
- the inverse of MDATA2.
- When downloading firmware from the host,
- set this bit (pull down MDATA2).
- The host clears this bit after downloading the firmware into
- zero-wait-state SSRAM.
- When loading firmware from Flash, clear this bit (pull up MDATA2)
- so that the eCPU can run the bootloader code in Flash
- HALT_ECPU eCPU State
- --------------------
- 1 halt eCPU
- 0 enable eCPU
- ===============================================*/
- #define ACX_REG_ECPU_CONTROL (REGISTERS_BASE + 0x0804)
- #define HI_CFG (REGISTERS_BASE + 0x0808)
- /*===============================================
- EEPROM Burst Read Start - 32bit RW
- ------------------------------------------
- [31:1] Reserved
- 0 ACX_EE_START - EEPROM Burst Read Start 0
- Setting this bit starts a burst read from
- the external EEPROM.
- If this bit is set (after reset) before an EEPROM read/write,
- the burst read starts at EEPROM address 0.
- Otherwise, it starts at the address
- following the address of the previous access.
- TheWlan hardware hardware clears this bit automatically.
- Default: 0x00000000
- *================================================*/
- #define ACX_REG_EE_START (REGISTERS_BASE + 0x080C)
- #define OCP_POR_CTR (REGISTERS_BASE + 0x09B4)
- #define OCP_DATA_WRITE (REGISTERS_BASE + 0x09B8)
- #define OCP_DATA_READ (REGISTERS_BASE + 0x09BC)
- #define OCP_CMD (REGISTERS_BASE + 0x09C0)
- #define WL1271_HOST_WR_ACCESS (REGISTERS_BASE + 0x09F8)
- #define CHIP_ID_B (REGISTERS_BASE + 0x5674)
- #define CHIP_ID_1271_PG10 (0x4030101)
- #define CHIP_ID_1271_PG20 (0x4030111)
- #define CHIP_ID_1283_PG10 (0x05030101)
- #define CHIP_ID_1283_PG20 (0x05030111)
- #define ENABLE (REGISTERS_BASE + 0x5450)
- /* Power Management registers */
- #define ELP_CFG_MODE (REGISTERS_BASE + 0x5804)
- #define ELP_CMD (REGISTERS_BASE + 0x5808)
- #define PLL_CAL_TIME (REGISTERS_BASE + 0x5810)
- #define CLK_REQ_TIME (REGISTERS_BASE + 0x5814)
- #define CLK_BUF_TIME (REGISTERS_BASE + 0x5818)
- #define CFG_PLL_SYNC_CNT (REGISTERS_BASE + 0x5820)
- /* Scratch Pad registers*/
- #define SCR_PAD0 (REGISTERS_BASE + 0x5608)
- #define SCR_PAD1 (REGISTERS_BASE + 0x560C)
- #define SCR_PAD2 (REGISTERS_BASE + 0x5610)
- #define SCR_PAD3 (REGISTERS_BASE + 0x5614)
- #define SCR_PAD4 (REGISTERS_BASE + 0x5618)
- #define SCR_PAD4_SET (REGISTERS_BASE + 0x561C)
- #define SCR_PAD4_CLR (REGISTERS_BASE + 0x5620)
- #define SCR_PAD5 (REGISTERS_BASE + 0x5624)
- #define SCR_PAD5_SET (REGISTERS_BASE + 0x5628)
- #define SCR_PAD5_CLR (REGISTERS_BASE + 0x562C)
- #define SCR_PAD6 (REGISTERS_BASE + 0x5630)
- #define SCR_PAD7 (REGISTERS_BASE + 0x5634)
- #define SCR_PAD8 (REGISTERS_BASE + 0x5638)
- #define SCR_PAD9 (REGISTERS_BASE + 0x563C)
- /* Spare registers*/
- #define SPARE_A1 (REGISTERS_BASE + 0x0994)
- #define SPARE_A2 (REGISTERS_BASE + 0x0998)
- #define SPARE_A3 (REGISTERS_BASE + 0x099C)
- #define SPARE_A4 (REGISTERS_BASE + 0x09A0)
- #define SPARE_A5 (REGISTERS_BASE + 0x09A4)
- #define SPARE_A6 (REGISTERS_BASE + 0x09A8)
- #define SPARE_A7 (REGISTERS_BASE + 0x09AC)