Merge branch 'master' of https://git.trustie.net/xuos/xiuos into qemu-arm

This commit is contained in:
Huang_Yuqing
2021-05-18 18:19:09 +08:00
7 changed files with 14 additions and 98 deletions
+4 -29
View File
@@ -53,7 +53,6 @@ Modification:
extern x_base cpu2_boot_flag;
extern void entry(void);
extern void SecondaryCpuCStart(void);
extern void ShutdownCpu(void);
extern int IoConfigInit(void);
extern int HwCh438Init(void);
extern int HwSpiInit(void);
@@ -98,7 +97,7 @@ void Kd233Start(uint32_t mhartid)
}
}
int freq(void)
int Freq(void)
{
uint64 value = 0;
@@ -124,7 +123,7 @@ int freq(void)
return 0;
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),freq, freq, show freq info );
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),Freq, Freq, show frequency information );
#ifdef ARCH_SMP
extern int EnableHwclintIpi(void);
@@ -218,30 +217,6 @@ void HwCpuReset(void)
while(RET_TRUE);
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),
reboot, HwCpuReset, reset machine );
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0), Reboot, HwCpuReset, reset machine );
static void (*pre_shutdown_action)(void *);
static void *pre_shutdown_action_arg;
void SetPreShutdownAction(void (*func)(void *), void *arg)
{
pre_shutdown_action = func;
pre_shutdown_action_arg = arg;
}
void cmd_shutdown()
{
#ifdef FS_VFS
SyncOpenedFiles();
#endif
if (pre_shutdown_action != NULL)
pre_shutdown_action(pre_shutdown_action_arg);
ShutdownCpu();
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),
shutdown,cmd_shutdown,shutdown machine);
+2 -24
View File
@@ -54,7 +54,6 @@ Modification:
extern x_base cpu2_boot_flag;
extern void entry(void);
extern void SecondaryCpuCStart(void);
extern void ShutdownCpu(void);
extern int IoConfigInit(void);
extern int HwSpiInit(void);
extern int HwI2cInit(void);
@@ -121,7 +120,7 @@ int Freq(void)
return 0;
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),freq, Freq, show freq info );
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),Freq, Freq, show frequency information );
#ifdef ARCH_SMP
extern int EnableHwclintIpi(void);
@@ -205,27 +204,6 @@ void HwCpuReset(void)
while(RET_TRUE);
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),
reboot, HwCpuReset, reset machine );
static void (*pre_shutdown_action)(void *);
static void *pre_shutdown_action_arg;
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),Reboot, HwCpuReset, reset machine );
void SetPreShutdownAction(void (*func)(void *), void *arg)
{
pre_shutdown_action = func;
pre_shutdown_action_arg = arg;
}
void CmdShutdown()
{
#ifdef FS_VFS
SyncOpenedFiles();
#endif
if (pre_shutdown_action != NULL)
pre_shutdown_action(pre_shutdown_action_arg);
ShutdownCpu();
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),
shutdown,CmdShutdown,shutdown machine);
+3 -25
View File
@@ -51,7 +51,6 @@ Modification:
extern x_base cpu2_boot_flag;
extern void entry(void);
extern void SecondaryCpuCStart(void);
extern void ShutdownCpu(void);
extern int IoConfigInit(void);
extern int HwSpiInit(void);
extern int HwI2cInit(void);
@@ -117,7 +116,7 @@ int Freq(void)
return 0;
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),freq, Freq, show freq info );
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),Freq, Freq, show frequency information );
#ifdef ARCH_SMP
extern int EnableHwclintIpi(void);
@@ -170,27 +169,6 @@ void HwCpuReset(void)
while(RET_TRUE);
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),
reboot, HwCpuReset, reset machine );
static void (*pre_shutdown_action)(void *);
static void *pre_shutdown_action_arg;
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),Reboot, HwCpuReset, reset machine );
void SetPreShutdownAction(void (*func)(void *), void *arg)
{
pre_shutdown_action = func;
pre_shutdown_action_arg = arg;
}
void CmdShutdown()
{
#ifdef FS_VFS
SyncOpenedFiles();
#endif
if (pre_shutdown_action != NULL)
pre_shutdown_action(pre_shutdown_action_arg);
ShutdownCpu();
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),
shutdown,CmdShutdown,shutdown machine);