Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
[pandora-kernel.git] / drivers / staging / ath6kl / include / bmi.h
1 //------------------------------------------------------------------------------
2 // <copyright file="bmi.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.
17 //
18 //
19 //------------------------------------------------------------------------------
20 //==============================================================================
21 // BMI declarations and prototypes
22 //
23 // Author(s): ="Atheros"
24 //==============================================================================
25 #ifndef _BMI_H_
26 #define _BMI_H_
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /* Header files */
33 #include "a_config.h"
34 #include "athdefs.h"
35 #include "hif.h"
36 #include "a_osapi.h"
37 #include "bmi_msg.h"
38
39 void
40 BMIInit(void);
41
42 void
43 BMICleanup(void);
44
45 int
46 BMIDone(struct hif_device *device);
47
48 int
49 BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info);
50
51 int
52 BMIReadMemory(struct hif_device *device,
53               u32 address,
54               u8 *buffer,
55               u32 length);
56
57 int
58 BMIWriteMemory(struct hif_device *device,
59                u32 address,
60                u8 *buffer,
61                u32 length);
62
63 int
64 BMIExecute(struct hif_device *device,
65            u32 address,
66            u32 *param);
67
68 int
69 BMISetAppStart(struct hif_device *device,
70                u32 address);
71
72 int
73 BMIReadSOCRegister(struct hif_device *device,
74                    u32 address,
75                    u32 *param);
76
77 int
78 BMIWriteSOCRegister(struct hif_device *device,
79                     u32 address,
80                     u32 param);
81
82 int
83 BMIrompatchInstall(struct hif_device *device,
84                    u32 ROM_addr,
85                    u32 RAM_addr,
86                    u32 nbytes,
87                    u32 do_activate,
88                    u32 *patch_id);
89
90 int
91 BMIrompatchUninstall(struct hif_device *device,
92                      u32 rompatch_id);
93
94 int
95 BMIrompatchActivate(struct hif_device *device,
96                     u32 rompatch_count,
97                     u32 *rompatch_list);
98
99 int
100 BMIrompatchDeactivate(struct hif_device *device,
101                       u32 rompatch_count,
102                       u32 *rompatch_list);
103
104 int
105 BMILZStreamStart(struct hif_device *device,
106                  u32 address);
107
108 int
109 BMILZData(struct hif_device *device,
110           u8 *buffer,
111           u32 length);
112
113 int
114 BMIFastDownload(struct hif_device *device,
115                 u32 address,
116                 u8 *buffer,
117                 u32 length);
118
119 int
120 BMIRawWrite(struct hif_device *device,
121             u8 *buffer,
122             u32 length);
123
124 int
125 BMIRawRead(struct hif_device *device, 
126            u8 *buffer, 
127            u32 length,
128            bool want_timeout);
129
130 #ifdef __cplusplus
131 }
132 #endif
133
134 #endif /* _BMI_H_ */