2 * Misc useful routines to access NIC local SROM/OTP .
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: bcmsrom.h,v 13.37 2008-10-03 23:17:52 Exp $
24 #include <bcmsrom_fmt.h>
27 extern int srom_var_init(si_t
*sih
, uint bus
, void *curmap
, osl_t
*osh
,
28 char **vars
, uint
*count
);
30 extern int srom_read(si_t
*sih
, uint bus
, void *curmap
, osl_t
*osh
,
31 uint byteoff
, uint nbytes
, uint16
*buf
,
34 extern int srom_write(si_t
*sih
, uint bus
, void *curmap
, osl_t
*osh
,
35 uint byteoff
, uint nbytes
, uint16
*buf
);
37 extern int srom_otp_cisrwvar(si_t
*sih
, osl_t
*osh
, char *vars
, int *count
);
38 #if defined(WLTEST) || defined(BCMDBG)
39 extern int srom_otp_write_region_crc(si_t
*sih
, uint nbytes
, uint16
* buf16
, bool write
);
42 /* parse standard PCMCIA cis, normally used by SB/PCMCIA/SDIO/SPI/OTP
43 * and extract from it into name=value pairs
45 extern int srom_parsecis(osl_t
*osh
, uint8
**pcis
, uint ciscnt
,
46 char **vars
, uint
*count
);
48 #if defined(BCMUSBDEV)
49 /* Return sprom size in 16-bit words */
50 extern uint
srom_size(si_t
*sih
, osl_t
*osh
);
53 #endif /* _bcmsrom_h_ */