soc: arm: nordic: Deprecate reboot type in GPREGRET
Deprecates setting GPREGRET to the reset reason as this has been replaced with the boot mode retention subsystem for nRF51/nRF52. Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
5e8b067364
commit
f79a08d6c0
3 changed files with 25 additions and 2 deletions
|
@ -136,4 +136,17 @@ config NRF_TRACE_PORT
|
|||
Unit) for tracing using a hardware probe. If disabled, the trace
|
||||
pins will be used as GPIO.
|
||||
|
||||
config NRF_STORE_REBOOT_TYPE_GPREGRET
|
||||
bool "Set GPREGRET to reboot type (DEPRECATED)"
|
||||
depends on SOC_SERIES_NRF51X || SOC_SERIES_NRF52X
|
||||
depends on REBOOT
|
||||
depends on !RETENTION_BOOT_MODE
|
||||
select DEPRECATED
|
||||
help
|
||||
If this option is enabled, then the parameter supplied to the
|
||||
sys_reboot() function will be set in the GPREGRET register.
|
||||
|
||||
This has been replaced with the bootmode part of the retention
|
||||
subsystem, which should be used instead.
|
||||
|
||||
endif # SOC_FAMILY_NRF
|
||||
|
|
|
@ -23,13 +23,18 @@
|
|||
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(soc);
|
||||
|
||||
#ifdef CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET
|
||||
/* Overrides the weak ARM implementation:
|
||||
Set general purpose retention register and reboot */
|
||||
* Set general purpose retention register and reboot
|
||||
* This is deprecated and has been replaced with the boot mode retention
|
||||
* subsystem
|
||||
*/
|
||||
void sys_arch_reboot(int type)
|
||||
{
|
||||
nrf_power_gpregret_set(NRF_POWER, (uint8_t)type);
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
#endif
|
||||
|
||||
static int nordicsemi_nrf51_init(void)
|
||||
{
|
||||
|
|
|
@ -23,13 +23,18 @@
|
|||
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
|
||||
LOG_MODULE_REGISTER(soc);
|
||||
|
||||
#ifdef CONFIG_NRF_STORE_REBOOT_TYPE_GPREGRET
|
||||
/* Overrides the weak ARM implementation:
|
||||
Set general purpose retention register and reboot */
|
||||
* Set general purpose retention register and reboot
|
||||
* This is deprecated and has been replaced with the boot mode retention
|
||||
* subsystem
|
||||
*/
|
||||
void sys_arch_reboot(int type)
|
||||
{
|
||||
nrf_power_gpregret_set(NRF_POWER, (uint8_t)type);
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
#endif
|
||||
|
||||
static int nordicsemi_nrf52_init(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue