Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
csr_wifi_hip_unifihw.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  (c) Cambridge Silicon Radio Limited 2011
4  All rights reserved and confidential information of CSR
5 
6  Refer to LICENSE.txt included with this source for details
7  on the license terms.
8 
9 *****************************************************************************/
10 
11 /*
12  * ---------------------------------------------------------------------------
13  *
14  * File: csr_wifi_hip_unifihw.h
15  *
16  * Definitions of various chip registers, addresses, values etc.
17  *
18  * ---------------------------------------------------------------------------
19  */
20 #ifndef __UNIFIHW_H__
21 #define __UNIFIHW_H__ 1
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Symbol Look Up Table fingerprint. IDs are in sigs.h */
28 #define SLUT_FINGERPRINT 0xD397
29 
30 
31 /* Values of LoaderOperation */
32 #define UNIFI_LOADER_IDLE 0x00
33 #define UNIFI_LOADER_COPY 0x01
34 #define UNIFI_LOADER_ERROR_MASK 0xF0
35 
36 /* Values of BootLoaderOperation */
37 #define UNIFI_BOOT_LOADER_IDLE 0x00
38 #define UNIFI_BOOT_LOADER_RESTART 0x01
39 #define UNIFI_BOOT_LOADER_PATCH 0x02
40 #define UNIFI_BOOT_LOADER_LOAD_STA 0x10
41 #define UNIFI_BOOT_LOADER_LOAD_PTEST 0x11
42 
43 
44 /* Memory spaces encoded in top byte of Generic Pointer type */
45 #define UNIFI_SH_DMEM 0x01 /* Shared Data Memory */
46 #define UNIFI_EXT_FLASH 0x02 /* External FLASH */
47 #define UNIFI_EXT_SRAM 0x03 /* External SRAM */
48 #define UNIFI_REGISTERS 0x04 /* Registers */
49 #define UNIFI_PHY_DMEM 0x10 /* PHY Data Memory */
50 #define UNIFI_PHY_PMEM 0x11 /* PHY Program Memory */
51 #define UNIFI_PHY_ROM 0x12 /* PHY ROM */
52 #define UNIFI_MAC_DMEM 0x20 /* MAC Data Memory */
53 #define UNIFI_MAC_PMEM 0x21 /* MAC Program Memory */
54 #define UNIFI_MAC_ROM 0x22 /* MAC ROM */
55 #define UNIFI_BT_DMEM 0x30 /* BT Data Memory */
56 #define UNIFI_BT_PMEM 0x31 /* BT Program Memory */
57 #define UNIFI_BT_ROM 0x32 /* BT ROM */
58 
59 #define UNIFI_MAKE_GP(R, O) (((UNIFI_ ## R) << 24) | (O))
60 #define UNIFI_GP_OFFSET(GP) ((GP) & 0xFFFFFF)
61 #define UNIFI_GP_SPACE(GP) (((GP) >> 24) & 0xFF)
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* __UNIFIHW_H__ */