arch: x86: core: reboot_rst_cnt: Enable support for warm reboot
Enable support for warm reboot for x86 arch as per the Reset Control Register description. Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
This commit is contained in:
parent
11083fc049
commit
9353abf162
1 changed files with 10 additions and 0 deletions
|
@ -27,12 +27,22 @@ static inline void cold_reboot(void)
|
|||
sys_out8(reset_value, X86_RST_CNT_REG);
|
||||
}
|
||||
|
||||
static inline void warm_reboot(void)
|
||||
{
|
||||
uint8_t reset_value = X86_RST_CNT_CPU_RST | X86_RST_CNT_SYS_RST;
|
||||
|
||||
sys_out8(reset_value, X86_RST_CNT_REG);
|
||||
}
|
||||
|
||||
void __weak sys_arch_reboot(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case SYS_REBOOT_COLD:
|
||||
cold_reboot();
|
||||
break;
|
||||
case SYS_REBOOT_WARM:
|
||||
warm_reboot();
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue