2 * Misc useful routines to access NIC local SROM/OTP .
4 * Copyright (C) 2009, Broadcom Corporation
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 $
18 #include <bcmsrom_fmt.h>
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
,
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
);
33 extern int srom_otp_write_region_crc(si_t
*sih
, uint nbytes
, uint16
* buf16
, bool write
);
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
);
47 #endif /* _bcmsrom_h_ */