OpenBIC
OpenSource Bridge-IC
shell_plat_soc_pwron_reset.c File Reference
#include <shell/shell.h>
#include <stdlib.h>
#include <logging/log.h>
#include <string.h>
#include "plat_isr.h"
#include "plat_i2c.h"
#include "plat_cpld.h"
Include dependency graph for shell_plat_soc_pwron_reset.c:

Classes

struct  soc_pwron_reset_item_t
 

Macros

#define ARRAY_SIZE(x)   (sizeof(x) / sizeof((x)[0]))
 
#define ARKE_BOARD_POWER_ENABLE   0xFF
 
#define ARKE_BOARD_POWER_DISABLE   0xC7
 
#define HAMSA_POWER_ON_RESET_BIT   5
 
#define NUWA0_POWER_ON_RESET_BIT   4
 
#define NUWA1_POWER_ON_RESET_BIT   3
 
#define HAMSA_SYS_RST_BIT   2
 
#define NUWA0_SYS_RST_BIT   1
 
#define NUWA1_SYS_RST_BIT   0
 
#define SOC_PWRON_RESET_CNT   ARRAY_SIZE(soc_pwron_reset_list)
 

Functions

 LOG_MODULE_REGISTER (plat_soc_pwron_reset_shell)
 
 SHELL_DYNAMIC_CMD_CREATE (soc_pwron_reset_set_dynamic, soc_pwron_reset_set_name_get_)
 
 SHELL_DYNAMIC_CMD_CREATE (soc_pwron_reset_get_dynamic, soc_pwron_reset_get_name_get_)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_soc_pwron_reset_cmds, SHELL_CMD_ARG(override, NULL, "soc_pwron_reset override <0|1>", cmd_soc_pwron_reset_override, 2, 1), SHELL_CMD(passthru, NULL, "soc_pwron_reset passthru", cmd_soc_pwron_reset_override), SHELL_CMD(get, &soc_pwron_reset_get_dynamic, "soc_pwron_reset get all | get <NAME>", cmd_soc_pwron_reset_get), SHELL_CMD(set, &soc_pwron_reset_set_dynamic, "soc_pwron_reset set <NAME> <0|1>", cmd_soc_pwron_reset_set), SHELL_SUBCMD_SET_END)
 
 SHELL_CMD_REGISTER (soc_pwron_reset, &sub_soc_pwron_reset_cmds, "soc_pwron_reset commands", NULL)
 

Macro Definition Documentation

◆ ARKE_BOARD_POWER_DISABLE

#define ARKE_BOARD_POWER_DISABLE   0xC7

◆ ARKE_BOARD_POWER_ENABLE

#define ARKE_BOARD_POWER_ENABLE   0xFF

◆ ARRAY_SIZE

#define ARRAY_SIZE (   x)    (sizeof(x) / sizeof((x)[0]))

◆ HAMSA_POWER_ON_RESET_BIT

#define HAMSA_POWER_ON_RESET_BIT   5

◆ HAMSA_SYS_RST_BIT

#define HAMSA_SYS_RST_BIT   2

◆ NUWA0_POWER_ON_RESET_BIT

#define NUWA0_POWER_ON_RESET_BIT   4

◆ NUWA0_SYS_RST_BIT

#define NUWA0_SYS_RST_BIT   1

◆ NUWA1_POWER_ON_RESET_BIT

#define NUWA1_POWER_ON_RESET_BIT   3

◆ NUWA1_SYS_RST_BIT

#define NUWA1_SYS_RST_BIT   0

◆ SOC_PWRON_RESET_CNT

#define SOC_PWRON_RESET_CNT   ARRAY_SIZE(soc_pwron_reset_list)

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_soc_pwron_reset_shell  )

◆ SHELL_CMD_REGISTER()

SHELL_CMD_REGISTER ( soc_pwron_reset  ,
sub_soc_pwron_reset_cmds,
"soc_pwron_reset commands"  ,
NULL   
)

◆ SHELL_DYNAMIC_CMD_CREATE() [1/2]

SHELL_DYNAMIC_CMD_CREATE ( soc_pwron_reset_get_dynamic  ,
soc_pwron_reset_get_name_get_   
)

◆ SHELL_DYNAMIC_CMD_CREATE() [2/2]

SHELL_DYNAMIC_CMD_CREATE ( soc_pwron_reset_set_dynamic  ,
soc_pwron_reset_set_name_get_   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE()

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_soc_pwron_reset_cmds  ,
SHELL_CMD_ARG(override, NULL, "soc_pwron_reset override <0|1>", cmd_soc_pwron_reset_override, 2, 1)  ,
SHELL_CMD(passthru, NULL, "soc_pwron_reset passthru", cmd_soc_pwron_reset_override)  ,
SHELL_CMD(get, &soc_pwron_reset_get_dynamic, "soc_pwron_reset get all | get <NAME>", cmd_soc_pwron_reset_get)  ,
SHELL_CMD(set, &soc_pwron_reset_set_dynamic, "soc_pwron_reset set <NAME> <0|1>", cmd_soc_pwron_reset_set)  ,
SHELL_SUBCMD_SET_END   
)