aboutsummaryrefslogtreecommitdiffstats
path: root/include/bcmotp.h
blob: 35ebeaed94f3cf9dfb2f361ddbe0ea05d894206d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Write-once support for otp.
 *
 * Copyright 2007, Broadcom Corporation
 * All Rights Reserved.
 * 
 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
 *
 * $Id: bcmotp.h,v 1.1.1.1 2008/07/21 09:14:16 james26_jang Exp $
 */

#define OTP_HW_RGN	1
#define OTP_SW_RGN	2
#define OTP_CI_RGN	4
#define OTP_FUSE_RGN	8

extern void *otp_init(sb_t *sbh);

extern uint16 otpr(void *oh, chipcregs_t *cc, uint wn);
extern uint16 otpw(void *oh, chipcregs_t *cc, uint16 data, uint wn);

extern int otp_status(void *oh);
extern int otp_size(void *oh);

extern int otp_read_region(void *oh, int region, uint16 *data, uint wlen);
extern int otp_write_region(void *oh, int region, uint16 *data, uint wlen);

extern int otp_nvread(void *oh, char *data, uint *len);

#ifdef BCMNVRAMW
extern int otp_nvwrite(void *oh, uint16 *data, uint wlen);
#endif

#if defined(WLTEST)
extern int otp_dump(void *oh, int arg, char *buf, uint size);
#endif
bues.ch cgit interface