Add PPTP runtime and GUI
[tomato.git] / release / src / include / bcmotp.h
blob529b5e774309d7376bd3730dd3244d30ed130899
1 /*
2 * Write-once support for otp.
4 * Copyright 2007, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
12 * $Id$
15 #define OTP_HW_RGN 1
16 #define OTP_SW_RGN 2
17 #define OTP_CI_RGN 4
18 #define OTP_FUSE_RGN 8
20 extern void *otp_init(sb_t *sbh);
22 extern uint16 otpr(void *oh, chipcregs_t *cc, uint wn);
23 extern uint16 otpw(void *oh, chipcregs_t *cc, uint16 data, uint wn);
25 extern int otp_status(void *oh);
26 extern int otp_size(void *oh);
28 extern int otp_read_region(void *oh, int region, uint16 *data, uint wlen);
29 extern int otp_write_region(void *oh, int region, uint16 *data, uint wlen);
31 extern int otp_nvread(void *oh, char *data, uint *len);
33 #ifdef BCMNVRAMW
34 extern int otp_nvwrite(void *oh, uint16 *data, uint wlen);
35 #endif
37 #if defined(WLTEST)
38 extern int otp_dump(void *oh, int arg, char *buf, uint size);
39 #endif