summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcm4329/include/sbhnddma.h
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-05-19 18:53:11 -0700
committerColin Cross <ccross@android.com>2011-06-14 09:09:32 -0700
commitda65eba112b2bcd1f54eb41bb0960078eba1657e (patch)
tree2c8ac975489804bcd23daaafb835646acf15c4c8 /drivers/net/wireless/bcm4329/include/sbhnddma.h
parent058abe5367489f424afa14753b642c036ed9c2be (diff)
network: wireless: bcm4329: Add bcm4329 driver
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Add "HANG" event and console monitoring Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Remove unnecessary set_freezable() calls Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Update to Version 4.218.238 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Fix MAC address import Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Fix wlan card removal Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Update to Version 4.218.239 Add reading mac address from platform data Add dhd_os_proto_block protection for dhd_preinit_ioctls Revert dhdsdio_clk() changes Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add SoftAP MAC address randomization Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Add 2.6.35 compatibility and fix memory leak in set_multicast_list Signed-off-by: Dmitry Shmidt <dimitrysh@android.com> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Reduce driver loading time Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Set special OUI: 02:1A:11:FH:HH:HH for SoftAP Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Fix BUS DOWN in IOCTL Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Add driver SETSUSPEND command Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix packet filter to only filter out non-unicast frames Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add wakelock processing in ioctl and messaging Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to 4.218.245 (combo scan) Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.246 and setband fix Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add wakelock processing to WEXT requests Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Force scan when driver is loaded Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix scan timeout for abg case Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix dhd_bus_watchdog() race conditions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix unregister_early_suspend() in dhd_detach() Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add memory barriers to wait functions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix "setsuspend" behavior Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Increase PMU_MAX_TRANSITION_DLY to 1 sec Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Turn OFF packet filtering during DHCP session Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Disable packet filtering Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Send "HANG" message only once Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix HW_OOB interrupt processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix interrupt enabling for level interrupt Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> Revert "net: wireless: bcm4329: Fix interrupt enabling for level interrupt" This reverts commit 261d21bbfffef6261696d0d13672d2e4f9d76f05. Revert "net: wireless: bcm4329: Fix HW_OOB interrupt processing" This reverts commit 8bd035daa820dc5612ae311262c71dc133871046. net: wireless: bcm4329: Fix HW_OOB interrupt processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix roaming failure case Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix roaming setting on resume Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add debug print for cscan failure Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Ignore error if scan results are empty Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Enable packet filtering during low power mode Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248.6 Fix watchdog time rescheduling, fix first scan no-return Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix interrupt enabling in case of error Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix setting HT clock race conditions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix setting HT clock race conditions in driver start Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248-10 Add KEEP_ALIVE feature, fix 'driver rssi' processing, fix roaming processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Improve BT-coex for eSCO Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix race conditions for sysioc_thread Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to version 4.218.248-11 Check for 'driver start' failure, Set keep-alive feature forever Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Check for out of bounds in scan results parsing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add check for out of bounds scan buffer Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to version 4.218.248-12 - Fix crash during Specific Scan handling - Fix potential insmod crash by increase Registration Timeout to 12 sec - Added max time restriction to PNO scan timer - New IWPRIV "AP_STA_DISASSOC" to disassoc STAs in SoftAP mode - Add new setting to SoftAP "AP_SET_CFG" to enable Hidden SSID - Fixs bugs for SoftAP AP_SET_MAC_FLTR iwpriv commnd - Add STAs rssi filed to SoftAP "AP_GET_STA_LIST" IWPRIV commnd Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix watchdog termination after 'driver stop' Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Enable KEEP_ALIVE feature Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add FW Reload event processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix Softap start/stop race conditions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Set first channel passive scan to 30 ms Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248-15 - Increase default Listen Interval to 20 Beacons - Add logic to adjust SKIP_DTIM if Listen Interval < DTIM * DTIM_SKIP to avoid data lost due to fact that packet maybe not retrieved during Listen Interval and AP may toss it - Fix problem with Hidden AP setting after AP reconfigure - Add new SoftAP optional parameter as COUNTRY to pass country code to SoftAP Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Improve way to detect BT SCO connection for BT-coex Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Use non-DFS channels only for US Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add 'setdfschannels' command Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix watchdog syncronization during start/stop Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix driver 'start' retry ability Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix memory leak in case of dhd_bus_init() failure Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add CONFIG_FIRST_SCAN option Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248-17 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to version 4.218.248-18 - Improve BT-coex to differentiate HID and SCO device during DHCP session - Enforce DTIM=1 for any SoftAP settings to optimize internal memory logic Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless/bcm4329/include/sbhnddma.h')
-rw-r--r--drivers/net/wireless/bcm4329/include/sbhnddma.h294
1 files changed, 294 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm4329/include/sbhnddma.h b/drivers/net/wireless/bcm4329/include/sbhnddma.h
new file mode 100644
index 00000000000..7681395f5b3
--- /dev/null
+++ b/drivers/net/wireless/bcm4329/include/sbhnddma.h
@@ -0,0 +1,294 @@
+/*
+ * Generic Broadcom Home Networking Division (HND) DMA engine HW interface
+ * This supports the following chips: BCM42xx, 44xx, 47xx .
+ *
+ * Copyright (C) 1999-2010, Broadcom Corporation
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed to you
+ * under the terms of the GNU General Public License version 2 (the "GPL"),
+ * available at http://www.broadcom.com/licenses/GPLv2.php, with the
+ * following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give you
+ * permission to link this software with independent modules, and to copy and
+ * distribute the resulting executable under terms of your choice, provided that
+ * you also meet, for each linked independent module, the terms and conditions of
+ * the license of that module. An independent module is a module which is not
+ * derived from this software. The special exception does not apply to any
+ * modifications of the software.
+ *
+ * Notwithstanding the above, under no circumstances may you combine this
+ * software in any way with any other Broadcom software provided under a license
+ * other than the GPL, without Broadcom's express prior written consent.
+ *
+ * $Id: sbhnddma.h,v 13.11.250.5.16.1 2009/07/21 14:04:51 Exp $
+ */
+
+
+#ifndef _sbhnddma_h_
+#define _sbhnddma_h_
+
+
+
+
+
+
+
+typedef volatile struct {
+ uint32 control;
+ uint32 addr;
+ uint32 ptr;
+ uint32 status;
+} dma32regs_t;
+
+typedef volatile struct {
+ dma32regs_t xmt;
+ dma32regs_t rcv;
+} dma32regp_t;
+
+typedef volatile struct {
+ uint32 fifoaddr;
+ uint32 fifodatalow;
+ uint32 fifodatahigh;
+ uint32 pad;
+} dma32diag_t;
+
+
+typedef volatile struct {
+ uint32 ctrl;
+ uint32 addr;
+} dma32dd_t;
+
+
+#define D32RINGALIGN_BITS 12
+#define D32MAXRINGSZ (1 << D32RINGALIGN_BITS)
+#define D32RINGALIGN (1 << D32RINGALIGN_BITS)
+#define D32MAXDD (D32MAXRINGSZ / sizeof (dma32dd_t))
+
+
+#define XC_XE ((uint32)1 << 0)
+#define XC_SE ((uint32)1 << 1)
+#define XC_LE ((uint32)1 << 2)
+#define XC_FL ((uint32)1 << 4)
+#define XC_PD ((uint32)1 << 11)
+#define XC_AE ((uint32)3 << 16)
+#define XC_AE_SHIFT 16
+
+
+#define XP_LD_MASK 0xfff
+
+
+#define XS_CD_MASK 0x0fff
+#define XS_XS_MASK 0xf000
+#define XS_XS_SHIFT 12
+#define XS_XS_DISABLED 0x0000
+#define XS_XS_ACTIVE 0x1000
+#define XS_XS_IDLE 0x2000
+#define XS_XS_STOPPED 0x3000
+#define XS_XS_SUSP 0x4000
+#define XS_XE_MASK 0xf0000
+#define XS_XE_SHIFT 16
+#define XS_XE_NOERR 0x00000
+#define XS_XE_DPE 0x10000
+#define XS_XE_DFU 0x20000
+#define XS_XE_BEBR 0x30000
+#define XS_XE_BEDA 0x40000
+#define XS_AD_MASK 0xfff00000
+#define XS_AD_SHIFT 20
+
+
+#define RC_RE ((uint32)1 << 0)
+#define RC_RO_MASK 0xfe
+#define RC_RO_SHIFT 1
+#define RC_FM ((uint32)1 << 8)
+#define RC_SH ((uint32)1 << 9)
+#define RC_OC ((uint32)1 << 10)
+#define RC_PD ((uint32)1 << 11)
+#define RC_AE ((uint32)3 << 16)
+#define RC_AE_SHIFT 16
+
+
+#define RP_LD_MASK 0xfff
+
+
+#define RS_CD_MASK 0x0fff
+#define RS_RS_MASK 0xf000
+#define RS_RS_SHIFT 12
+#define RS_RS_DISABLED 0x0000
+#define RS_RS_ACTIVE 0x1000
+#define RS_RS_IDLE 0x2000
+#define RS_RS_STOPPED 0x3000
+#define RS_RE_MASK 0xf0000
+#define RS_RE_SHIFT 16
+#define RS_RE_NOERR 0x00000
+#define RS_RE_DPE 0x10000
+#define RS_RE_DFO 0x20000
+#define RS_RE_BEBW 0x30000
+#define RS_RE_BEDA 0x40000
+#define RS_AD_MASK 0xfff00000
+#define RS_AD_SHIFT 20
+
+
+#define FA_OFF_MASK 0xffff
+#define FA_SEL_MASK 0xf0000
+#define FA_SEL_SHIFT 16
+#define FA_SEL_XDD 0x00000
+#define FA_SEL_XDP 0x10000
+#define FA_SEL_RDD 0x40000
+#define FA_SEL_RDP 0x50000
+#define FA_SEL_XFD 0x80000
+#define FA_SEL_XFP 0x90000
+#define FA_SEL_RFD 0xc0000
+#define FA_SEL_RFP 0xd0000
+#define FA_SEL_RSD 0xe0000
+#define FA_SEL_RSP 0xf0000
+
+
+#define CTRL_BC_MASK 0x1fff
+#define CTRL_AE ((uint32)3 << 16)
+#define CTRL_AE_SHIFT 16
+#define CTRL_EOT ((uint32)1 << 28)
+#define CTRL_IOC ((uint32)1 << 29)
+#define CTRL_EOF ((uint32)1 << 30)
+#define CTRL_SOF ((uint32)1 << 31)
+
+
+#define CTRL_CORE_MASK 0x0ff00000
+
+
+
+
+typedef volatile struct {
+ uint32 control;
+ uint32 ptr;
+ uint32 addrlow;
+ uint32 addrhigh;
+ uint32 status0;
+ uint32 status1;
+} dma64regs_t;
+
+typedef volatile struct {
+ dma64regs_t tx;
+ dma64regs_t rx;
+} dma64regp_t;
+
+typedef volatile struct {
+ uint32 fifoaddr;
+ uint32 fifodatalow;
+ uint32 fifodatahigh;
+ uint32 pad;
+} dma64diag_t;
+
+
+typedef volatile struct {
+ uint32 ctrl1;
+ uint32 ctrl2;
+ uint32 addrlow;
+ uint32 addrhigh;
+} dma64dd_t;
+
+
+#define D64RINGALIGN_BITS 13
+#define D64MAXRINGSZ (1 << D64RINGALIGN_BITS)
+#define D64RINGALIGN (1 << D64RINGALIGN_BITS)
+#define D64MAXDD (D64MAXRINGSZ / sizeof (dma64dd_t))
+
+
+#define D64_XC_XE 0x00000001
+#define D64_XC_SE 0x00000002
+#define D64_XC_LE 0x00000004
+#define D64_XC_FL 0x00000010
+#define D64_XC_PD 0x00000800
+#define D64_XC_AE 0x00030000
+#define D64_XC_AE_SHIFT 16
+
+
+#define D64_XP_LD_MASK 0x00000fff
+
+
+#define D64_XS0_CD_MASK 0x00001fff
+#define D64_XS0_XS_MASK 0xf0000000
+#define D64_XS0_XS_SHIFT 28
+#define D64_XS0_XS_DISABLED 0x00000000
+#define D64_XS0_XS_ACTIVE 0x10000000
+#define D64_XS0_XS_IDLE 0x20000000
+#define D64_XS0_XS_STOPPED 0x30000000
+#define D64_XS0_XS_SUSP 0x40000000
+
+#define D64_XS1_AD_MASK 0x0001ffff
+#define D64_XS1_XE_MASK 0xf0000000
+#define D64_XS1_XE_SHIFT 28
+#define D64_XS1_XE_NOERR 0x00000000
+#define D64_XS1_XE_DPE 0x10000000
+#define D64_XS1_XE_DFU 0x20000000
+#define D64_XS1_XE_DTE 0x30000000
+#define D64_XS1_XE_DESRE 0x40000000
+#define D64_XS1_XE_COREE 0x50000000
+
+
+#define D64_RC_RE 0x00000001
+#define D64_RC_RO_MASK 0x000000fe
+#define D64_RC_RO_SHIFT 1
+#define D64_RC_FM 0x00000100
+#define D64_RC_SH 0x00000200
+#define D64_RC_OC 0x00000400
+#define D64_RC_PD 0x00000800
+#define D64_RC_AE 0x00030000
+#define D64_RC_AE_SHIFT 16
+
+
+#define D64_RP_LD_MASK 0x00000fff
+
+
+#define D64_RS0_CD_MASK 0x00001fff
+#define D64_RS0_RS_MASK 0xf0000000
+#define D64_RS0_RS_SHIFT 28
+#define D64_RS0_RS_DISABLED 0x00000000
+#define D64_RS0_RS_ACTIVE 0x10000000
+#define D64_RS0_RS_IDLE 0x20000000
+#define D64_RS0_RS_STOPPED 0x30000000
+#define D64_RS0_RS_SUSP 0x40000000
+
+#define D64_RS1_AD_MASK 0x0001ffff
+#define D64_RS1_RE_MASK 0xf0000000
+#define D64_RS1_RE_SHIFT 28
+#define D64_RS1_RE_NOERR 0x00000000
+#define D64_RS1_RE_DPO 0x10000000
+#define D64_RS1_RE_DFU 0x20000000
+#define D64_RS1_RE_DTE 0x30000000
+#define D64_RS1_RE_DESRE 0x40000000
+#define D64_RS1_RE_COREE 0x50000000
+
+
+#define D64_FA_OFF_MASK 0xffff
+#define D64_FA_SEL_MASK 0xf0000
+#define D64_FA_SEL_SHIFT 16
+#define D64_FA_SEL_XDD 0x00000
+#define D64_FA_SEL_XDP 0x10000
+#define D64_FA_SEL_RDD 0x40000
+#define D64_FA_SEL_RDP 0x50000
+#define D64_FA_SEL_XFD 0x80000
+#define D64_FA_SEL_XFP 0x90000
+#define D64_FA_SEL_RFD 0xc0000
+#define D64_FA_SEL_RFP 0xd0000
+#define D64_FA_SEL_RSD 0xe0000
+#define D64_FA_SEL_RSP 0xf0000
+
+
+#define D64_CTRL1_EOT ((uint32)1 << 28)
+#define D64_CTRL1_IOC ((uint32)1 << 29)
+#define D64_CTRL1_EOF ((uint32)1 << 30)
+#define D64_CTRL1_SOF ((uint32)1 << 31)
+
+
+#define D64_CTRL2_BC_MASK 0x00007fff
+#define D64_CTRL2_AE 0x00030000
+#define D64_CTRL2_AE_SHIFT 16
+#define D64_CTRL2_PARITY 0x00040000
+
+
+#define D64_CTRL_CORE_MASK 0x0ff00000
+
+
+#endif