OpenBIC
OpenSource Bridge-IC
fru.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef FRU_H
18#define FRU_H
19
20#include "eeprom.h"
21
22#define FRU_ID_NOT_FOUND 0xFF
23
33};
34
35enum {
41};
42
43enum {
46};
47
48extern EEPROM_CFG fru_config[];
49
50bool find_FRU_ID(uint8_t FRUID, uint8_t *fru_id);
51uint8_t get_FRU_access(uint8_t FRUID);
52uint16_t find_FRU_size(uint8_t FRUID);
53uint8_t FRU_read(EEPROM_ENTRY *entry);
54uint8_t FRU_write(EEPROM_ENTRY *entry);
55void pal_load_fru_config(void);
56void FRU_init(void);
58
59#endif
uint8_t get_FRU_access(uint8_t FRUID)
Definition: fru.c:48
uint8_t FRU_write(EEPROM_ENTRY *entry)
Definition: fru.c:110
void FRU_init(void)
Definition: fru.c:149
void pal_load_fru_config(void)
Definition: fru.c:144
bool find_FRU_ID(uint8_t FRUID, uint8_t *fru_id)
Definition: fru.c:29
uint16_t find_FRU_size(uint8_t FRUID)
Definition: fru.c:62
bool write_psb_inform(EEPROM_ENTRY *entry)
Definition: fru.c:154
uint8_t FRU_read(EEPROM_ENTRY *entry)
Definition: fru.c:76
EEPROM_CFG fru_config[]
Definition: fru.c:27
@ FRU_INVALID_ID
Definition: fru.h:38
@ FRU_READ_SUCCESS
Definition: fru.h:37
@ FRU_FAIL_TO_ACCESS
Definition: fru.h:40
@ FRU_OUT_OF_RANGE
Definition: fru.h:39
@ FRU_WRITE_SUCCESS
Definition: fru.h:36
@ FRU_DEV_ACCESS_WORD
Definition: fru.h:45
@ FRU_DEV_ACCESS_BYTE
Definition: fru.h:44
FRU_DEV_TYPE
Definition: fru.h:24
@ ST_M24C64_W
Definition: fru.h:29
@ NV_ATMEL_24C02
Definition: fru.h:25
@ NV_ATMEL_24C64
Definition: fru.h:26
@ ST_M24512_RDW
Definition: fru.h:31
@ ROHM_BR24G512
Definition: fru.h:32
@ PUYA_P24C128F
Definition: fru.h:28
@ ST_M24128_BW
Definition: fru.h:30
@ NV_ATMEL_24C128
Definition: fru.h:27
Definition: eeprom.h:42
Definition: eeprom.h:56