Skip to content
Permalink
Browse files

cleanup: include/: move misc/reboot.h to power/reboot.h

move misc/reboot.h to power/reboot.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jun 26, 2019
1 parent efb8df5 commit 5b0aa794b24739c639a3d81c91223657d5f2f4b3
@@ -16,7 +16,7 @@
#include <kernel.h>
#include <arch/cpu.h>
#include <sys/printk.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <toolchain.h>
#include <linker/sections.h>

@@ -11,7 +11,7 @@
*/

#include <kernel.h>
#include <misc/reboot.h>
#include <power/reboot.h>

/* reboot through Reset Control Register (I/O port 0xcf9) */

@@ -12,7 +12,7 @@
#include <soc.h>
#include <drivers/watchdog.h>
#include <sys/printk.h>
#include <misc/reboot.h>
#include <power/reboot.h>

struct wdog_cmsdk_apb {
/* offset: 0x000 (r/w) watchdog load register */
@@ -1,42 +1,15 @@
/*
* Copyright (c) 2015 Wind River Systems, Inc.
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/**
* @file
* @brief Common target reboot functionality
*
* @details See misc/Kconfig and the reboot help for details.
*/

#ifndef ZEPHYR_INCLUDE_MISC_REBOOT_H_
#define ZEPHYR_INCLUDE_MISC_REBOOT_H_

#ifdef __cplusplus
extern "C" {
#ifndef CONFIG_COMPAT_INCLUDES
#warning "This header file has moved, include <power/reboot.h> instead."
#endif

#define SYS_REBOOT_WARM 0
#define SYS_REBOOT_COLD 1

/**
* @brief Reboot the system
*
* Reboot the system in the manner specified by @a type. Not all architectures
* or platforms support the various reboot types (SYS_REBOOT_COLD,
* SYS_REBOOT_WARM).
*
* When successful, this routine does not return.
*
* @return N/A
*/

extern void sys_reboot(int type);

#ifdef __cplusplus
}
#endif
#include <power/reboot.h>

#endif /* ZEPHYR_INCLUDE_MISC_REBOOT_H_ */
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

/**
* @file
* @brief Common target reboot functionality
*
* @details See misc/Kconfig and the reboot help for details.
*/

#ifndef ZEPHYR_INCLUDE_POWER_REBOOT_H_
#define ZEPHYR_INCLUDE_POWER_REBOOT_H_

#ifdef __cplusplus
extern "C" {
#endif

#define SYS_REBOOT_WARM 0
#define SYS_REBOOT_COLD 1

/**
* @brief Reboot the system
*
* Reboot the system in the manner specified by @a type. Not all architectures
* or platforms support the various reboot types (SYS_REBOOT_COLD,
* SYS_REBOOT_WARM).
*
* When successful, this routine does not return.
*
* @return N/A
*/

extern void sys_reboot(int type);

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_INCLUDE_POWER_REBOOT_H_ */
@@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(updatehub);
#include <net/coap.h>
#include <net/dns_resolve.h>
#include <drivers/flash.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <tinycrypt/sha256.h>
#include <data/json.h>

@@ -39,7 +39,7 @@


#include <zephyr.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <device.h>
#include <string.h>
#include <drivers/flash.h>
@@ -5,7 +5,7 @@
*/

#include <kernel.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <openthread/instance.h>
#include <openthread/platform/misc.h>

@@ -13,7 +13,7 @@
#include <kernel.h>
#include <drivers/timer/system_timer.h>
#include <sys/printk.h>
#include <misc/reboot.h>
#include <power/reboot.h>

extern void sys_arch_reboot(int type);
extern void sys_clock_disable(void);
@@ -9,7 +9,7 @@
#include <shell/shell.h>
#include <init.h>
#include <debug/object_tracing.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <debug/stack.h>
#include <string.h>
#include <device.h>
@@ -6,7 +6,7 @@

#include <zephyr.h>
#include <sys/printk.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <arch/arm/cortex_m/cmsis.h>
#include <ztest.h>
#include <tc_util.h>
@@ -8,7 +8,7 @@
#include <ztest.h>

#include <zephyr.h>
#include <misc/reboot.h>
#include <power/reboot.h>
#include <string.h>

#include <settings/settings.h>

0 comments on commit 5b0aa79

Please sign in to comment.
You can’t perform that action at this time.