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 <charles.youse@intel.com>
This commit is contained in:
parent
4bdbd879ef
commit
ef736f77c2
2 changed files with 10 additions and 10 deletions
|
@ -13,11 +13,18 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/reboot.h>
|
#include <misc/reboot.h>
|
||||||
|
|
||||||
|
/* 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)
|
static inline void cold_reboot(void)
|
||||||
{
|
{
|
||||||
u8_t reset_value = SYS_X86_RST_CNT_CPU_RST | SYS_X86_RST_CNT_SYS_RST |
|
u8_t reset_value = X86_RST_CNT_CPU_RST | X86_RST_CNT_SYS_RST |
|
||||||
SYS_X86_RST_CNT_FULL_RST;
|
X86_RST_CNT_FULL_RST;
|
||||||
sys_out8(reset_value, SYS_X86_RST_CNT_REG);
|
sys_out8(reset_value, X86_RST_CNT_REG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sys_arch_reboot(int type)
|
void sys_arch_reboot(int type)
|
||||||
|
|
|
@ -678,13 +678,6 @@ void z_x86_reset_pages(void *start, size_t size);
|
||||||
|
|
||||||
#endif /* !_ASMLANGUAGE */
|
#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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue