Broadcom SDK and wireless driver: another attempt to update to ver. 5.10.147.0
[tomato.git] / release / src-rt / include / bcmsrom.h
blob3024b017c3d7b2b029a2f202150c4a1e7fec1f6a
1 /*
2 * Misc useful routines to access NIC local SROM/OTP .
4 * Copyright (C) 2009, 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: bcmsrom.h,v 13.30.2.8 2008/10/05 02:56:01 Exp $
15 #ifndef _bcmsrom_h_
16 #define _bcmsrom_h_
18 #include <bcmsrom_fmt.h>
20 /* Prototypes */
21 extern int srom_var_init(si_t *sih, uint bus, void *curmap, osl_t *osh,
22 char **vars, uint *count);
24 extern int srom_read(si_t *sih, uint bus, void *curmap, osl_t *osh,
25 uint byteoff, uint nbytes, uint16 *buf,
26 bool check_crc);
28 extern int srom_write(si_t *sih, uint bus, void *curmap, osl_t *osh,
29 uint byteoff, uint nbytes, uint16 *buf);
31 extern int srom_otp_cisrwvar(si_t *sih, osl_t *osh, char *vars, int *count);
32 #if defined(WLTEST)
33 extern int srom_otp_write_region_crc(si_t *sih, uint nbytes, uint16* buf16, bool write);
34 #endif
36 /* parse standard PCMCIA cis, normally used by SB/PCMCIA/SDIO/SPI/OTP
37 * and extract from it into name=value pairs
39 extern int srom_parsecis(osl_t *osh, uint8 **pcis, uint ciscnt,
40 char **vars, uint *count);
42 #if defined(BCMUSBDEV)
43 /* Return sprom size in 16-bit words */
44 extern uint srom_size(si_t *sih, osl_t *osh);
45 #endif
47 #endif /* _bcmsrom_h_ */