Skip to content

Commit

Permalink
Revert "[nrf fromtree] [nrfconnect] Improve SoftwareUpdateCompleted b…
Browse files Browse the repository at this point in the history
…oot reason detection (project-chip#21851)"

This reverts commit 2d06fd4.
  • Loading branch information
kkasperczyk-no committed Aug 31, 2022
1 parent a7ba249 commit dbeacc6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 134 deletions.
11 changes: 2 additions & 9 deletions src/platform/Zephyr/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
#include <drivers/hwinfo.h>
#include <sys/util.h>

#if CHIP_DEVICE_LAYER_TARGET_NRFCONNECT
#include <platform/nrfconnect/Reboot.h>
#elif defined(CONFIG_MCUBOOT_IMG_MANAGER)
#ifdef CONFIG_MCUBOOT_IMG_MANAGER
#include <dfu/mcuboot.h>
#endif

Expand Down Expand Up @@ -90,12 +88,7 @@ BootReasonType DetermineBootReason()

if (reason & RESET_SOFTWARE)
{
#if CHIP_DEVICE_LAYER_TARGET_NRFCONNECT
if (GetSoftwareRebootReason() == SoftwareRebootReason::kSoftwareUpdate)
{
return BootReasonType::kSoftwareUpdateCompleted;
}
#elif defined(CONFIG_MCUBOOT_IMG_MANAGER)
#ifdef CONFIG_MCUBOOT_IMG_MANAGER
if (mcuboot_swap_type() == BOOT_SWAP_TYPE_REVERT)
{
return BootReasonType::kSoftwareUpdateCompleted;
Expand Down
2 changes: 0 additions & 2 deletions src/platform/nrfconnect/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ static_library("nrfconnect") {
"InetPlatformConfig.h",
"KeyValueStoreManagerImpl.h",
"PlatformManagerImpl.h",
"Reboot.cpp",
"Reboot.h",
"SystemPlatformConfig.h",
]

Expand Down
5 changes: 2 additions & 3 deletions src/platform/nrfconnect/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include "OTAImageProcessorImpl.h"

#include "Reboot.h"

#include <app/clusters/ota-requestor/OTADownloader.h>
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
#include <lib/support/CodeUtils.h>
Expand All @@ -37,6 +35,7 @@
#include <dfu/mcuboot.h>
#include <logging/log.h>
#include <pm/device.h>
#include <sys/reboot.h>

#if CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE
// Cd globals are needed to be accessed from dfu image writer lambdas
Expand Down Expand Up @@ -124,7 +123,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply()
[](System::Layer *, void * /* context */) {
PlatformMgr().HandleServerShuttingDown();
k_msleep(CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS);
Reboot(SoftwareRebootReason::kSoftwareUpdate);
sys_reboot(SYS_REBOOT_WARM);
},
nullptr /* context */);
}
Expand Down
85 changes: 0 additions & 85 deletions src/platform/nrfconnect/Reboot.cpp

This file was deleted.

35 changes: 0 additions & 35 deletions src/platform/nrfconnect/Reboot.h

This file was deleted.

0 comments on commit dbeacc6

Please sign in to comment.