/* File scope function prototypes */
static bool is_checksum_valid(u8 *eeprom);
-static int read_eeprom(int devnum, u8 *eeprom);
-static void show_eeprom(int devnum, u8 *eeprom);
static void decode_tlv(struct tlvinfo_tlv *tlv);
static void update_crc(u8 *eeprom);
-static int prog_eeprom(int devnum, u8 *eeprom);
-static bool tlvinfo_find_tlv(u8 *eeprom, u8 tcode, int *eeprom_index);
-static bool tlvinfo_delete_tlv(u8 *eeprom, u8 code);
-static bool tlvinfo_add_tlv(u8 *eeprom, int tcode, char *strval);
static int set_mac(char *buf, const char *string);
static int set_date(char *buf, const char *string);
static int set_bytes(char *buf, const char *string, int *converted_accum);
*
* Read the EEPROM into memory, if it hasn't already been read.
*/
-static int read_eeprom(int devnum, u8 *eeprom)
+int read_eeprom(int devnum, u8 *eeprom)
{
int ret;
struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
*
* Display the contents of the EEPROM
*/
-static void show_eeprom(int devnum, u8 *eeprom)
+void show_eeprom(int devnum, u8 *eeprom)
{
int tlv_end;
int curr_tlv;
*
* Write the EEPROM data from CPU memory to the hardware.
*/
-static int prog_eeprom(int devnum, u8 *eeprom)
+int prog_eeprom(int devnum, u8 *eeprom)
{
int ret = 0;
struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
* An offset from the beginning of the EEPROM is returned in the
* eeprom_index parameter if the TLV is found.
*/
-static bool tlvinfo_find_tlv(u8 *eeprom, u8 tcode, int *eeprom_index)
+bool tlvinfo_find_tlv(u8 *eeprom, u8 tcode, int *eeprom_index)
{
struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
struct tlvinfo_tlv *eeprom_tlv;
* This function deletes the TLV with the specified type code from the
* EEPROM.
*/
-static bool tlvinfo_delete_tlv(u8 *eeprom, u8 code)
+bool tlvinfo_delete_tlv(u8 *eeprom, u8 code)
{
int eeprom_index;
int tlength;
* the format in which it will be stored in the EEPROM.
*/
#define MAX_TLV_VALUE_LEN 256
-static bool tlvinfo_add_tlv(u8 *eeprom, int tcode, char *strval)
+bool tlvinfo_add_tlv(u8 *eeprom, int tcode, char *strval)
{
struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
struct tlvinfo_tlv *eeprom_tlv;
(be16_to_cpu(hdr->totallen) <= TLV_TOTAL_LEN_MAX));
}
+void show_eeprom(int devnum, u8 *eeprom);
+bool tlvinfo_find_tlv(u8 *eeprom, u8 tcode, int *eeprom_index);
+bool tlvinfo_delete_tlv(u8 *eeprom, u8 code);
+bool tlvinfo_add_tlv(u8 *eeprom, int tcode, char *strval);
+int prog_eeprom(int devnum, u8 *eeprom);
+int read_eeprom(int devnum, u8 *eeprom);
+void show_tlv_code_list(void);
+
#endif /* __TLV_EEPROM_H_ */