738ef9135a8bfa908673060a1029ab04a18765c9
[deliverable/linux.git] / drivers / staging / brcm80211 / include / hndtcam.h
1 /*
2 * Copyright (c) 2010 Broadcom Corporation
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #ifndef _hndtcam_h_
18 #define _hndtcam_h_
19
20 /*
21 * 0 - 1
22 * 1 - 2 Consecutive locations are patched
23 * 2 - 4 Consecutive locations are patched
24 * 3 - 8 Consecutive locations are patched
25 * 4 - 16 Consecutive locations are patched
26 * Define default to patch 2 locations
27 */
28
29 #define PATCHCOUNT 0
30 #define SRPC_PATCHCOUNT PATCHCOUNT
31
32 /* N Consecutive location to patch */
33 #define SRPC_PATCHNLOC (1 << (SRPC_PATCHCOUNT))
34
35 /* patch values and address structure */
36 typedef struct patchaddrvalue {
37 uint32 addr;
38 uint32 value;
39 } patchaddrvalue_t;
40
41 extern void hnd_patch_init(void *srp);
42 extern void hnd_tcam_write(void *srp, u16 index, uint32 data);
43 extern void hnd_tcam_read(void *srp, u16 index, uint32 * content);
44 void *hnd_tcam_init(void *srp, uint no_addrs);
45 extern void hnd_tcam_disablepatch(void *srp);
46 extern void hnd_tcam_enablepatch(void *srp);
47 extern void hnd_tcam_load(void *srp, const patchaddrvalue_t * patchtbl);
48 #endif /* _hndtcam_h_ */
This page took 0.033015 seconds and 5 git commands to generate.