OpenBIC
OpenSource Bridge-IC
plat_class.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 PLAT_CLASS_H
18#define PLAT_CLASS_H
19
20#include <stdbool.h>
21#include <stdint.h>
22
23#define SYS_CLASS_1 1
24#define SYS_CLASS_2 2
25
31};
32
38};
39
40typedef struct _CARD_STATUS_ {
41 bool present;
42 uint8_t card_type;
44
57};
58
60 TYPE_2OU_DPV2_8 = 0x07, // DPV2x8
61 TYPE_2OU_DPV2_16 = 0x70, // DPV2x16
64};
65
71};
72
73/* ADC channel number */
76};
77
81};
82
83uint8_t get_system_class();
86uint8_t get_board_revision();
87uint8_t get_hsc_module();
88bool get_adc_voltage(int channel, float *voltage);
90
91#endif
uint8_t get_hsc_module()
Definition: plat_class.c:30
HSC_MODULE
Definition: plat_class.h:23
@ HSC_MODULE_UNKNOWN
Definition: plat_class.h:26
uint8_t get_board_revision()
Definition: plat_class.c:431
int init_platform_config()
Definition: expansion_board.c:43
bool get_adc_voltage(int channel, float *voltage)
Definition: plat_class.c:58
Definition: plat_class.h:33
uint8_t card_type
Definition: plat_class.h:35
bool present
Definition: plat_class.h:34
uint8_t get_system_class()
Definition: util_sys.c:146
ADC_CHANNEL
Definition: plat_class.c:80
struct _CARD_STATUS_ CARD_STATUS
CARD_STATUS get_1ou_status()
Definition: plat_class.c:137
BIC_CARD_PRESENT
Definition: plat_class.h:65
@ CARD_PRESENT
Definition: plat_class.h:67
@ CARD_UNPRESENT
Definition: plat_class.h:66
CARD_STATUS get_2ou_status()
Definition: plat_class.c:142
_1OU_CARD_TYPE_
Definition: plat_class.h:38
@ TYPE_1OU_EXP_WITH_6_M2
Definition: plat_class.h:40
@ TYPE_1OU_RAINBOW_FALLS
Definition: plat_class.h:41
@ TYPE_1OU_EXP_WITH_NIC
Definition: plat_class.h:44
@ TYPE_1OU_VERNAL_FALLS_WITH_AST
Definition: plat_class.h:43
@ TYPE_1OU_SI_TEST_CARD
Definition: plat_class.h:39
@ TYPE_1OU_ABSENT
Definition: plat_class.h:45
@ TYPE_1OU_VERNAL_FALLS_WITH_TI
Definition: plat_class.h:42
@ TYPE_1OU_UNKNOWN
Definition: plat_class.h:46
@ HSC_MODULE_ADM1278
Definition: plat_class.h:58
@ HSC_MODULE_LTC4282
Definition: plat_class.h:59
@ HSC_MODULE_MP5990
Definition: plat_class.h:60
_2OU_CARD_TYPE_
Definition: plat_class.h:49
@ TYPE_2OU_ABSENT
Definition: plat_class.h:53
@ TYPE_2OU_UNKNOWN
Definition: plat_class.h:54
@ TYPE_1OU_WAIMANO_FALLS
Definition: plat_class.h:67
@ TYPE_1OU_KAHUNA_FALLS
Definition: plat_class.h:66
@ TYPE_2OU_DPV2_8
Definition: plat_class.h:74
@ TYPE_2OU_DPV2_16
Definition: plat_class.h:75
@ CHANNEL_6
Definition: plat_class.h:82
@ SYS_BOARD_POC
Definition: plat_class.h:40
@ SYS_BOARD_EVT
Definition: plat_class.h:41
@ TYPE_1OU_EXP_WITH_E1S
Definition: plat_class.h:56
@ SYS_BOARD_PVT
Definition: plat_class.h:36
@ SYS_BOARD_DVT
Definition: plat_class.h:34
VR_VENDER_TYPE
Definition: plat_class.h:33
@ VR_VENDER_TI
Definition: plat_class.h:37
@ VR_VENDER_INFINEON
Definition: plat_class.h:35
@ VR_VENDER_RENESAS
Definition: plat_class.h:34
@ VR_VENDER_MPS
Definition: plat_class.h:36
BIC_BOARD_STAGE
Definition: plat_class.h:26