OpenBIC
OpenSource Bridge-IC
plat_thermal.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_THERMAL_H
18#define PLAT_THERMAL_H
19
20#include <stdint.h>
21#include "plat_user_setting.h"
22
23#define TEMP_STATUS_H_LIMIT BIT(4)
24#define TEMP_STATUS_L_LIMIT BIT(3)
25#define TEMP_STATUS_OPEN BIT(2)
26#define TEMP_LIMIT_STATUS (TEMP_STATUS_H_LIMIT | TEMP_STATUS_L_LIMIT)
27#define H_LIMIT_STATUS 0x35
28#define L_LIMIT_STATUS 0x36
29
30void init_thermal_polling(void);
33bool plat_clear_temp_status(uint8_t rail);
34bool plat_get_temp_status(uint8_t rail, uint8_t *temp_status);
35
36typedef struct temp_mapping_sensor {
37 uint8_t index;
38 uint8_t sensor_id;
39 uint8_t *sensor_name;
41
43
44#endif
@ TEMP_INDEX_MAX
Definition: plat_hook.h:94
struct temp_mapping_sensor temp_mapping_sensor
uint8_t get_thermal_status_val_for_log(uint8_t sensor_num)
Definition: plat_thermal.c:92
bool plat_clear_temp_status(uint8_t rail)
Definition: plat_hook.c:2411
uint8_t get_thermal_limit_status_val_for_log(uint8_t sensor_num)
Definition: plat_thermal.c:102
temp_mapping_sensor temp_index_table[TEMP_INDEX_MAX]
Definition: plat_hook.c:311
bool plat_get_temp_status(uint8_t rail, uint8_t *temp_status)
Definition: plat_hook.c:2350
void init_thermal_polling(void)
Definition: plat_thermal.c:359
uint8_t sensor_num
Definition: storage_handler.h:6
Definition: plat_hook.h:252
uint8_t index
Definition: plat_hook.h:253
uint8_t * sensor_name
Definition: plat_hook.h:255
uint8_t sensor_id
Definition: plat_hook.h:254