2 * HND SOCRAM TCAM software interface.
4 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved.
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.
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 ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: hndtcam.h,v 1.3 2008-12-17 13:09:49 Exp $
25 * 1 - 2 Consecutive locations are patched
26 * 2 - 4 Consecutive locations are patched
27 * 3 - 8 Consecutive locations are patched
28 * 4 - 16 Consecutive locations are patched
29 * Define default to patch 2 locations
33 #define SRPC_PATCHCOUNT PATCHCOUNT
36 #define SRPC_PATCHCOUNT PATCHCOUNT
39 /* N Consecutive location to patch */
40 #define SRPC_PATCHNLOC (1 << (SRPC_PATCHCOUNT))
42 /* patch values and address structure */
43 typedef struct patchaddrvalue
{
48 extern void hnd_patch_init(void *srp
);
49 extern void hnd_tcam_write(void *srp
, uint16 index
, uint32 data
);
50 extern void hnd_tcam_read(void *srp
, uint16 index
, uint32
*content
);
51 void * hnd_tcam_init(void *srp
, uint no_addrs
);
52 extern void hnd_tcam_disablepatch(void *srp
);
53 extern void hnd_tcam_enablepatch(void *srp
);
55 extern void hnd_tcam_bootloader_load(void *srp
, char *pvars
);
57 extern void hnd_tcam_load(void *srp
, const patchaddrvalue_t
*patchtbl
);
58 #endif /* CONFIG_XIP */
60 #endif /* _hndtcam_h_ */