From ef736f77c269f179b25b3e7408e8e22a755bf2b7 Mon Sep 17 00:00:00 2001 From: "Charles E. Youse" Date: Sun, 23 Jun 2019 20:43:50 +0000 Subject: [PATCH] arch/x86: relocate and rename SYS_X86_RST_* constants These constants do not need global exposure, as they're only referenced in the reboot API implementation. Also their names are trimmed to fit into the X86-arch-specific namespace. Signed-off-by: Charles E. Youse --- arch/x86/core/reboot_rst_cnt.c | 13 ++++++++++--- include/arch/x86/arch.h | 7 ------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/x86/core/reboot_rst_cnt.c b/arch/x86/core/reboot_rst_cnt.c index bcb77ce562c..b8100ea26f1 100644 --- a/arch/x86/core/reboot_rst_cnt.c +++ b/arch/x86/core/reboot_rst_cnt.c @@ -13,11 +13,18 @@ #include #include +/* reboot through Reset Control Register (I/O port 0xcf9) */ + +#define X86_RST_CNT_REG 0xcf9 +#define X86_RST_CNT_SYS_RST 0x02 +#define X86_RST_CNT_CPU_RST 0x4 +#define X86_RST_CNT_FULL_RST 0x08 + static inline void cold_reboot(void) { - u8_t reset_value = SYS_X86_RST_CNT_CPU_RST | SYS_X86_RST_CNT_SYS_RST | - SYS_X86_RST_CNT_FULL_RST; - sys_out8(reset_value, SYS_X86_RST_CNT_REG); + u8_t reset_value = X86_RST_CNT_CPU_RST | X86_RST_CNT_SYS_RST | + X86_RST_CNT_FULL_RST; + sys_out8(reset_value, X86_RST_CNT_REG); } void sys_arch_reboot(int type) diff --git a/include/arch/x86/arch.h b/include/arch/x86/arch.h index 54342bd172d..011e0ffeb6d 100644 --- a/include/arch/x86/arch.h +++ b/include/arch/x86/arch.h @@ -678,13 +678,6 @@ void z_x86_reset_pages(void *start, size_t size); #endif /* !_ASMLANGUAGE */ -/* reboot through Reset Control Register (I/O port 0xcf9) */ - -#define SYS_X86_RST_CNT_REG 0xcf9 -#define SYS_X86_RST_CNT_SYS_RST 0x02 -#define SYS_X86_RST_CNT_CPU_RST 0x4 -#define SYS_X86_RST_CNT_FULL_RST 0x08 - #ifdef __cplusplus } #endif