linux/drivers/staging/vt6655/srom.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * Purpose: Implement functions to access eeprom
 *
 * Author: Jerry Chen
 *
 * Date: Jan 29, 2003
 */

#ifndef __SROM_H__
#define __SROM_H__

/*---------------------  Export Definitions -------------------------*/

#define EEP_MAX_CONTEXT_SIZE

#define CB_EEPROM_READBYTE_WAIT

#define W_MAX_I2CRETRY

/* Contents in the EEPROM */
#define EEP_OFS_PAR
#define EEP_OFS_ANTENNA
#define EEP_OFS_RADIOCTL
#define EEP_OFS_RFTYPE
#define EEP_OFS_MINCHANNEL
#define EEP_OFS_MAXCHANNEL
#define EEP_OFS_SIGNATURE
#define EEP_OFS_ZONETYPE
#define EEP_OFS_RFTABLE
#define EEP_OFS_PWR_CCK
#define EEP_OFS_SETPT_CCK
#define EEP_OFS_PWR_OFDMG
#define EEP_OFS_SETPT_OFDMG
#define EEP_OFS_PWR_FORMULA_OST
#define EEP_OFS_MAJOR_VER
#define EEP_OFS_MINOR_VER
#define EEP_OFS_CCK_PWR_TBL
#define EEP_OFS_CCK_PWR_dBm
#define EEP_OFS_OFDM_PWR_TBL
#define EEP_OFS_OFDM_PWR_dBm
/*{{ RobertYu: 20041124 */
#define EEP_OFS_SETPT_OFDMA
#define EEP_OFS_OFDMA_PWR_TBL
/*}}*/
#define EEP_OFS_OFDMA_PWR_dBm

/*----------need to remove --------------------*/
#define EEP_OFS_BBTAB_LEN
#define EEP_OFS_BBTAB_ADR
#define EEP_OFS_CHECKSUM

#define EEP_I2C_DEV_ID

/* Bits in EEP_OFS_ANTENNA */
#define EEP_ANTENNA_MAIN
#define EEP_ANTENNA_AUX
#define EEP_ANTINV

/* Bits in EEP_OFS_RADIOCTL */
#define EEP_RADIOCTL_ENABLE
#define EEP_RADIOCTL_INV

/*---------------------  Export Types  ------------------------------*/

/*---------------------  Export Macros ------------------------------*/

/*---------------------  Export Classes  ----------------------------*/

/*---------------------  Export Variables  --------------------------*/

/*---------------------  Export Functions  --------------------------*/

unsigned char SROMbyReadEmbedded(void __iomem *iobase,
				 unsigned char byContntOffset);

void SROMvReadAllContents(void __iomem *iobase, unsigned char *pbyEepromRegs);

void SROMvReadEtherAddress(void __iomem *iobase,
			   unsigned char *pbyEtherAddress);

#endif /* __EEPROM_H__*/