|
OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <logging/log.h>#include <sys/crc.h>#include "pldm_firmware_update.h"#include "plat_pldm_fw_update.h"#include "plat_pldm_sensor.h"#include "plat_class.h"#include "plat_hook.h"#include "mp2971.h"#include "mp29816a.h"#include "raa228249.h"#include "drivers/i2c_npcm4xx.h"#include "util_spi.h"#include "plat_gpio.h"#include "plat_cpld.h"#include "plat_iris_smbus.h"#include "plat_util.h"#include "plat_i2c.h"
Classes | |
| struct | compnt_mapping_sensor |
Macros | |
| #define | RESET_CPLD_ON 0x3F |
| #define | RESET_CPLD_OFF 0x00 |
| #define | IRIS_BOOT0_IMG_SIZE 0x1FFFFB |
| #define | ASIC_VERSION_BYTE 0x68 |
| #define | I2C_MAX_RETRY 3 |
| #define | VR_COMPONENT_DEF(comp_id) |
Functions | |
| LOG_MODULE_REGISTER (plat_fwupdate) | |
| void | spi_node_disable () |
| void | change_spi_node_to_hamsa () |
| void | change_spi_node_to_medha0 () |
| void | change_spi_node_to_medha1 () |
| void | set_cpld_reset_reg (uint8_t value) |
| uint8_t | pldm_mtia_flash_update (void *fw_update_param) |
| uint32_t | plat_get_image_crc_checksum (uint8_t index) |
| uint32_t | plat_get_image_version (uint8_t index) |
| bool | plat_get_image_crc_checksum_from_flash (uint8_t index, uint8_t data_type, uint32_t *data) |
| int | sb_write_byte (uint8_t cmd, uint8_t data) |
| int | smbus_read_byte (uint8_t cmd, uint8_t *data) |
| int | sb_write_block (uint8_t slv_id, uint8_t cmd, uint8_t *data, uint32_t len) |
| int | sb_read_byte (uint8_t cmd, uint8_t *data) |
| uint32_t | smbus_mode_query (void) |
| int | sb_write_fwblock (uint32_t addr, uint32_t *data, uint32_t data_len) |
| uint8_t | pldm_pre_iris_boot_update (void *fw_update_param) |
| int | iris_data_write (uint8_t *data, uint32_t data_size) |
| uint8_t | pldm_iris_boot_update (void *fw_update_param) |
| uint8_t | pldm_post_iris_boot_update (void *fw_update_param) |
| bool | get_fw_version_from_asic (uint8_t *data) |
| uint8_t | plat_pldm_query_device_identifiers (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len) |
| void | load_pldmupdate_comp_config (void) |
| bool | find_sensor_id_and_name_by_firmware_comp_id (uint8_t comp_identifier, uint8_t *sensor_id, char *sensor_name) |
| void | plat_reset_prepare () |
| void | pal_warm_reset_prepare () |
Variables | |
| const struct device * | i2c_dev |
| uint8_t | slave_id = HAMSA_BOOT1_ADDR |
| bool | update_flag = 0 |
| compnt_mapping_sensor | vr_compnt_mapping_sensor_table [] |
| pldm_fw_update_info_t | PLDMUPDATE_FW_CONFIG_TABLE [] |
| #define ASIC_VERSION_BYTE 0x68 |
| #define I2C_MAX_RETRY 3 |
| #define IRIS_BOOT0_IMG_SIZE 0x1FFFFB |
| #define RESET_CPLD_OFF 0x00 |
| #define RESET_CPLD_ON 0x3F |
| #define VR_COMPONENT_DEF | ( | comp_id | ) |
| void change_spi_node_to_hamsa | ( | ) |

| void change_spi_node_to_medha0 | ( | ) |

| void change_spi_node_to_medha1 | ( | ) |

| bool find_sensor_id_and_name_by_firmware_comp_id | ( | uint8_t | comp_identifier, |
| uint8_t * | sensor_id, | ||
| char * | sensor_name | ||
| ) |
| bool get_fw_version_from_asic | ( | uint8_t * | data | ) |

| int iris_data_write | ( | uint8_t * | data, |
| uint32_t | data_size | ||
| ) |

| void load_pldmupdate_comp_config | ( | void | ) |
| LOG_MODULE_REGISTER | ( | plat_fwupdate | ) |
| void pal_warm_reset_prepare | ( | ) |

| uint32_t plat_get_image_crc_checksum | ( | uint8_t | index | ) |
| bool plat_get_image_crc_checksum_from_flash | ( | uint8_t | index, |
| uint8_t | data_type, | ||
| uint32_t * | data | ||
| ) |

| uint32_t plat_get_image_version | ( | uint8_t | index | ) |
| uint8_t plat_pldm_query_device_identifiers | ( | const uint8_t * | buf, |
| uint16_t | len, | ||
| uint8_t * | resp, | ||
| uint16_t * | resp_len | ||
| ) |

| void plat_reset_prepare | ( | ) |
| uint8_t pldm_iris_boot_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_mtia_flash_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_post_iris_boot_update | ( | void * | fw_update_param | ) |

| uint8_t pldm_pre_iris_boot_update | ( | void * | fw_update_param | ) |
| int sb_read_byte | ( | uint8_t | cmd, |
| uint8_t * | data | ||
| ) |
| int sb_write_block | ( | uint8_t | slv_id, |
| uint8_t | cmd, | ||
| uint8_t * | data, | ||
| uint32_t | len | ||
| ) |

| int sb_write_byte | ( | uint8_t | cmd, |
| uint8_t | data | ||
| ) |
| int sb_write_fwblock | ( | uint32_t | addr, |
| uint32_t * | data, | ||
| uint32_t | data_len | ||
| ) |
| void set_cpld_reset_reg | ( | uint8_t | value | ) |

| uint32_t smbus_mode_query | ( | void | ) |
| int smbus_read_byte | ( | uint8_t | cmd, |
| uint8_t * | data | ||
| ) |
| void spi_node_disable | ( | ) |

| const struct device* i2c_dev |
| pldm_fw_update_info_t PLDMUPDATE_FW_CONFIG_TABLE[] |
| uint8_t slave_id = HAMSA_BOOT1_ADDR |
| bool update_flag = 0 |
| compnt_mapping_sensor vr_compnt_mapping_sensor_table[] |