OpenBIC
OpenSource Bridge-IC
plat_dev.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_DEV
18#define PLAT_DEV
19
20#include <stdint.h>
21#include "sensor.h"
22#include "cci.h"
23
24#define CXL_IOEXP_INIT_RETRY_COUNT 5
25
26typedef struct _pm8702_dev_info {
27 bool is_init;
30
31typedef struct _cxl_vr_fw_info {
32 uint8_t checksum[4];
34 uint8_t vendor;
35 bool is_init;
37
40
41bool cxl_single_ioexp_alert_reset(uint8_t ioexp_name, bool is_mutex);
42int cxl_ioexp_init(uint8_t cxl_channel);
43void cxl_mb_status_init(uint8_t cxl_id);
44bool pal_init_pm8702_info(uint8_t cxl_id);
45bool pal_pm8702_command_handler(uint8_t cxl_id, uint16_t opcode, uint8_t *data_buf, int data_len,
46 uint8_t *response, uint8_t *response_len);
47bool pal_get_pm8702_hbo_status(uint8_t cxl_id, uint8_t *resp_buf, uint8_t *resp_len);
48bool pal_pm8702_transfer_fw(uint8_t cxl_id, uint8_t *req_buf, int req_len);
49bool pal_set_pm8702_active_slot(uint8_t cxl_id, uint8_t *req_buf, int req_len);
50void init_cxl_card_ioexp(uint8_t cxl_id);
51void clear_cxl_card_cache_value(uint8_t cxl_id);
54
55#endif
bool pal_init_pm8702_info(uint8_t cxl_id)
Definition: plat_dev.c:487
bool pal_pm8702_transfer_fw(uint8_t cxl_id, uint8_t *req_buf, int req_len)
Definition: plat_dev.c:526
bool pal_set_pm8702_active_slot(uint8_t cxl_id, uint8_t *req_buf, int req_len)
Definition: plat_dev.c:543
void init_ssd_power_fault_work()
Definition: plat_dev.c:667
void clear_cxl_card_cache_value(uint8_t cxl_id)
Definition: plat_dev.c:106
void clear_ssd_power_fault_flag()
Definition: plat_dev.c:98
bool pal_pm8702_command_handler(uint8_t cxl_id, uint16_t opcode, uint8_t *data_buf, int data_len, uint8_t *response, uint8_t *response_len)
Definition: plat_dev.c:560
bool cxl_single_ioexp_alert_reset(uint8_t ioexp_name, bool is_mutex)
Definition: plat_dev.c:202
int cxl_ioexp_init(uint8_t cxl_channel)
Definition: plat_dev.c:367
void cxl_mb_status_init(uint8_t cxl_id)
Definition: plat_dev.c:125
struct _pm8702_dev_info pm8702_dev_info
cxl_vr_fw_info cxl_vr_info_table[]
Definition: plat_dev.c:82
pm8702_dev_info pm8702_table[]
Definition: plat_dev.c:77
struct _cxl_vr_fw_info cxl_vr_fw_info
void init_cxl_card_ioexp(uint8_t cxl_id)
Definition: plat_dev.c:421
bool pal_get_pm8702_hbo_status(uint8_t cxl_id, uint8_t *resp_buf, uint8_t *resp_len)
Definition: plat_dev.c:508
uint16_t data_len
Definition: ipmb.h:14
Definition: cci.h:139
Definition: plat_dev.h:31
uint8_t checksum[4]
Definition: plat_dev.h:32
bool is_init
Definition: plat_dev.h:35
uint8_t remaining_write
Definition: plat_dev.h:33
uint8_t vendor
Definition: plat_dev.h:34
Definition: plat_dev.h:26
cci_fw_info_resp dev_info
Definition: plat_dev.h:28
bool is_init
Definition: plat_dev.h:27