staging: ath6kl: Convert A_UINT32 to u32
[pohmelfs.git] / drivers / staging / ath6kl / include / common / dsetid.h
blob090e3096792535d7f6214c28e0e221746947997b
1 //------------------------------------------------------------------------------
2 // <copyright file="dsetid.h" company="Atheros">
3 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
4 //
5 //
6 // Permission to use, copy, modify, and/or distribute this software for any
7 // purpose with or without fee is hereby granted, provided that the above
8 // copyright notice and this permission notice appear in all copies.
9 //
10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 //------------------------------------------------------------------------------
20 //==============================================================================
21 // Author(s): ="Atheros"
22 //==============================================================================
25 #ifndef __DSETID_H__
26 #define __DSETID_H__
28 #ifndef ATH_TARGET
29 #include "athstartpack.h"
30 #endif
32 /* Well-known DataSet IDs */
33 #define DSETID_UNUSED 0x00000000
34 #define DSETID_BOARD_DATA 0x00000001 /* Cal and board data */
35 #define DSETID_REGDB 0x00000002 /* Regulatory Database */
36 #define DSETID_POWER_CONTROL 0x00000003 /* TX Pwr Lim & Ant Gain */
37 #define DSETID_USER_CONFIG 0x00000004 /* User Configuration */
39 #define DSETID_ANALOG_CONTROL_DATA_START 0x00000005
40 #define DSETID_ANALOG_CONTROL_DATA_END 0x00000025
42 * Get DSETID for various reference clock speeds.
43 * For each speed there are three DataSets that correspond
44 * to the three columns of bank6 data (addr, 11a, 11b/g).
45 * This macro returns the dsetid of the first of those
46 * three DataSets.
48 #define ANALOG_CONTROL_DATA_DSETID(refclk) \
49 (DSETID_ANALOG_CONTROL_DATA_START + 3*refclk)
52 * There are TWO STARTUP_PATCH DataSets.
53 * DSETID_STARTUP_PATCH is historical, and was applied before BMI on
54 * earlier systems. On AR6002, it is applied after BMI, just like
55 * DSETID_STARTUP_PATCH2.
57 #define DSETID_STARTUP_PATCH 0x00000026
58 #define DSETID_GPIO_CONFIG_PATCH 0x00000027
59 #define DSETID_WLANREGS 0x00000028 /* override wlan regs */
60 #define DSETID_STARTUP_PATCH2 0x00000029
62 #define DSETID_WOW_CONFIG 0x00000090 /* WoW Configuration */
64 /* Add WHAL_INI_DATA_ID to DSETID_INI_DATA for a specific WHAL INI table. */
65 #define DSETID_INI_DATA 0x00000100
66 /* Reserved for WHAL INI Tables: 0x100..0x11f */
67 #define DSETID_INI_DATA_END 0x0000011f
69 #define DSETID_VENDOR_START 0x00010000 /* Vendor-defined DataSets */
71 #define DSETID_INDEX_END 0xfffffffe /* Reserved to indicate the
72 end of a memory-based
73 DataSet Index */
74 #define DSETID_INDEX_FREE 0xffffffff /* An unused index entry */
76 /*
77 * PATCH DataSet format:
78 * A list of patches, terminated by a patch with
79 * address=PATCH_END.
81 * This allows for patches to be stored in flash.
83 PREPACK struct patch_s {
84 u32 *address;
85 u32 data;
86 } POSTPACK ;
89 * Skip some patches. Can be used to erase a single patch in a
90 * patch DataSet without having to re-write the DataSet. May
91 * also be used to embed information for use by subsequent
92 * patch code. The "data" in a PATCH_SKIP tells how many
93 * bytes of length "patch_s" to skip.
95 #define PATCH_SKIP ((u32 *)0x00000000)
98 * Execute code at the address specified by "data".
99 * The address of the patch structure is passed as
100 * the one parameter.
102 #define PATCH_CODE_ABS ((u32 *)0x00000001)
105 * Same as PATCH_CODE_ABS, but treat "data" as an
106 * offset from the start of the patch word.
108 #define PATCH_CODE_REL ((u32 *)0x00000002)
110 /* Mark the end of this patch DataSet. */
111 #define PATCH_END ((u32 *)0xffffffff)
114 * A DataSet which contains a Binary Patch to some other DataSet
115 * uses the original dsetid with the DSETID_BPATCH_FLAG bit set.
116 * Such a BPatch DataSet consists of BPatch metadata followed by
117 * the bdiff bytes. BPatch metadata consists of a single 32-bit
118 * word that contains the size of the BPatched final image.
120 * To create a suitable bdiff DataSet, use bdiff in host/tools/bdiff
121 * to create "diffs":
122 * bdiff -q -O -nooldmd5 -nonewmd5 -d ORIGfile NEWfile diffs
123 * Then add BPatch metadata to the start of "diffs".
125 * NB: There are some implementation-induced restrictions
126 * on which DataSets can be BPatched.
128 #define DSETID_BPATCH_FLAG 0x80000000
130 #ifndef ATH_TARGET
131 #include "athendpack.h"
132 #endif
134 #endif /* __DSETID_H__ */