|
OpenBIC
OpenSource Bridge-IC
|
#include <stdlib.h>#include <shell/shell.h>#include "plat_cpld.h"#include <logging/log.h>#include <shell_plat_power_sequence.h>#include "plat_gpio.h"#include "plat_isr.h"#include "plat_i2c.h"#include "plat_ioexp.h"#include "plat_pldm_sensor.h"#include "plat_class.h"
Classes | |
| struct | power_good_status |
| struct | steps_on_struct |
| struct | pwr_clock_compnt_mapping |
| struct | ioe_power_good_status |
| struct | ioe_pwr_on |
Macros | |
| #define | enable 0x01 |
| #define | disable 0x00 |
| #define | NO_DEFINED 0xFF |
| #define | CLK_BUF_U85_ADDR (0xCE >> 1) |
| #define | CLK_BUF_U87_ADDR (0xD8 >> 1) |
| #define | CLK_BUF_U88_ADDR (0xDE >> 1) |
| #define | CLK_GEN_100M_U86_ADDR 0x9 |
| #define | CLK_BUF_100M_WRITE_LOCK_CLEAR_LOS_EVENT_OFFSET 0x27 |
| #define | CLK_GEN_LOSMON_EVENT_OFFSET 0x5a |
| #define | CLK_BUF_100M_BYTE_COUNT 0x7 |
| #define | MAX_STEPS (sizeof(steps_on) / sizeof(steps_on[0])) |
Typedefs | |
| typedef struct power_good_status | power_good_status |
| typedef struct steps_on_struct | steps_on_struct |
| typedef struct pwr_clock_compnt_mapping | pwr_clock_compnt_mapping |
| typedef struct ioe_power_good_status | ioe_power_good_status |
| typedef struct ioe_pwr_on | ioe_pwr_on |
Functions | |
| LOG_MODULE_REGISTER (shell_iris_power) | |
| void | clear_clock_status (const struct shell *shell, uint8_t clock_index) |
| void | power_on_p3v3_osfp () |
| void | power_off_p3v3_osfp (const struct shell *shell) |
| void | pwer_gd_get_status (const struct shell *shell) |
| void | steps_on_p3v3_osfp (const struct shell *shell) |
| void | pwr_get_clock_status (const struct shell *shell, uint8_t clock_index) |
| void | cmd_iris_power_on (const struct shell *shell, size_t argc, char **argv) |
| void | cmd_iris_power_off (const struct shell *shell, size_t argc, char **argv) |
| void | cmd_iris_power_cycle (const struct shell *shell, size_t argc, char **argv) |
| void | cmd_iris_steps_on (const struct shell *shell, size_t argc, char **argv) |
| void | cmd_iris_disable_steps_on (const struct shell *shell, size_t argc, char **argv) |
| SHELL_STATIC_SUBCMD_SET_CREATE (sub_iris_power_cmd, SHELL_CMD(on, NULL, "iris power on", cmd_iris_power_on), SHELL_CMD(off, NULL, "iris power off", cmd_iris_power_off), SHELL_CMD(cycle, NULL, "iris power cycle", cmd_iris_power_cycle), SHELL_CMD(steps_on, NULL, "iris power steps_on", cmd_iris_steps_on), SHELL_CMD(disable_steps_on, NULL, "iris power disable steps_on", cmd_iris_disable_steps_on), SHELL_SUBCMD_SET_END) | |
| SHELL_CMD_REGISTER (iris_power, &sub_iris_power_cmd, "iris power commands", NULL) | |
| #define CLK_BUF_100M_BYTE_COUNT 0x7 |
| #define CLK_BUF_100M_WRITE_LOCK_CLEAR_LOS_EVENT_OFFSET 0x27 |
| #define CLK_BUF_U85_ADDR (0xCE >> 1) |
| #define CLK_BUF_U87_ADDR (0xD8 >> 1) |
| #define CLK_BUF_U88_ADDR (0xDE >> 1) |
| #define CLK_GEN_100M_U86_ADDR 0x9 |
| #define CLK_GEN_LOSMON_EVENT_OFFSET 0x5a |
| #define disable 0x00 |
| #define enable 0x01 |
| #define MAX_STEPS (sizeof(steps_on) / sizeof(steps_on[0])) |
| #define NO_DEFINED 0xFF |
| typedef struct ioe_power_good_status ioe_power_good_status |
| typedef struct ioe_pwr_on ioe_pwr_on |
| typedef struct power_good_status power_good_status |
| typedef struct pwr_clock_compnt_mapping pwr_clock_compnt_mapping |
| typedef struct steps_on_struct steps_on_struct |
| enum PWR_CLOCK_COMPONENT |
| void clear_clock_status | ( | const struct shell * | shell, |
| uint8_t | clock_index | ||
| ) |

| void cmd_iris_disable_steps_on | ( | const struct shell * | shell, |
| size_t | argc, | ||
| char ** | argv | ||
| ) |

| void cmd_iris_power_cycle | ( | const struct shell * | shell, |
| size_t | argc, | ||
| char ** | argv | ||
| ) |
| void cmd_iris_power_off | ( | const struct shell * | shell, |
| size_t | argc, | ||
| char ** | argv | ||
| ) |
| void cmd_iris_power_on | ( | const struct shell * | shell, |
| size_t | argc, | ||
| char ** | argv | ||
| ) |
| void cmd_iris_steps_on | ( | const struct shell * | shell, |
| size_t | argc, | ||
| char ** | argv | ||
| ) |

| LOG_MODULE_REGISTER | ( | shell_iris_power | ) |
| void power_off_p3v3_osfp | ( | const struct shell * | shell | ) |

| void power_on_p3v3_osfp | ( | ) |

| void pwer_gd_get_status | ( | const struct shell * | shell | ) |

| void pwr_get_clock_status | ( | const struct shell * | shell, |
| uint8_t | clock_index | ||
| ) |

| SHELL_CMD_REGISTER | ( | iris_power | , |
| & | sub_iris_power_cmd, | ||
| "iris power commands" | , | ||
| NULL | |||
| ) |
| SHELL_STATIC_SUBCMD_SET_CREATE | ( | sub_iris_power_cmd | , |
| SHELL_CMD(on, NULL, "iris power on", cmd_iris_power_on) | , | ||
| SHELL_CMD(off, NULL, "iris power off", cmd_iris_power_off) | , | ||
| SHELL_CMD(cycle, NULL, "iris power cycle", cmd_iris_power_cycle) | , | ||
| SHELL_CMD(steps_on, NULL, "iris power steps_on", cmd_iris_steps_on) | , | ||
| SHELL_CMD(disable_steps_on, NULL, "iris power disable steps_on", cmd_iris_disable_steps_on) | , | ||
| SHELL_SUBCMD_SET_END | |||
| ) |
| void steps_on_p3v3_osfp | ( | const struct shell * | shell | ) |

| ioe_pwr_on ioe_pwr_on_table[] |
| ioe_power_good_status ioe_pwrgd_status_table[] |
| power_good_status power_good_status_table_for_steps_on[] |
| int power_steps = 0 |
| pwr_clock_compnt_mapping pwr_clock_compnt_mapping_table[] |