[iwm] fix default antenna selection a bit; fix 5GHz rate control handling.
[freebsd.git] / sys / dev / bhnd / bhnd_core.h
1 /*-
2  * Copyright (c) 2015 Landon Fuller <landon@landonf.org>
3  * Copyright (c) 2010 Broadcom Corporation
4  *
5  * This file is derived from the hndsoc.h header distributed with
6  * Broadcom's initial brcm80211 Linux driver release, as
7  * contributed to the Linux staging repository.
8  *
9  * Permission to use, copy, modify, and/or distribute this software for any
10  * purpose with or without fee is hereby granted, provided that the above
11  * copyright notice and this permission notice appear in all copies.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
16  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  * 
21  * $FreeBSD$
22  */
23
24 #ifndef _BHND_BHND_CORE_H_
25 #define _BHND_BHND_CORE_H_
26
27 /* Common core control flags */
28 #define BHND_CF                 0x0408
29 #define BHND_CF_BIST_EN         0x8000          /**< built-in self test */
30 #define BHND_CF_PME_EN          0x4000          /**< ??? */
31 #define BHND_CF_CORE_BITS       0x3ffc          /**< core specific flag mask */
32 #define BHND_CF_FGC             0x0002          /**< force clock gating */
33 #define BHND_CF_CLOCK_EN        0x0001          /**< enable clock */
34
35 /* Common core status flags */
36 #define BHND_SF                 0x0500
37 #define BHND_SF_BIST_DONE       0x8000          /**< ??? */
38 #define BHND_SF_BIST_ERROR      0x4000          /**< ??? */
39 #define BHND_SF_GATED_CLK       0x2000          /**< clock gated */
40 #define BHND_SF_DMA64           0x1000          /**< supports 64-bit DMA */
41 #define BHND_SF_CORE_BITS       0x0fff          /**< core-specific status mask */
42
43 /*Reset core control flags */
44 #define BHND_RESET_CF           0x0800
45 #define BHND_RESET_CF_ENABLE    0x0001
46
47 #define BHND_RESET_SF           0x0804
48
49 #endif /* _BHND_BHND_CORE_H_ */