Skip to content

Commit

Permalink
[platform] Remove dead code (#20222)
Browse files Browse the repository at this point in the history
Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Dec 19, 2023
1 parent 03d1087 commit 2085690
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 64 deletions.
13 changes: 0 additions & 13 deletions src/include/platform/CHIPDeviceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,6 @@
#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 100
#endif

/**
* CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
*
* Enable the device factory provisioning feature.
*
* The factory provisioning feature allows factory or developer-supplied provisioning information
* to be injected into a device at boot time and automatically stored in persistent storage.
*/
#ifndef CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
// We don't have platform/internal/FactoryProvisioning.ipp for now, so set it to 0 by default.
#define CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING 0
#endif

/**
* CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH
*
Expand Down
15 changes: 0 additions & 15 deletions src/platform/ESP32/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,6 @@ CHIP_ERROR ConfigurationManagerImpl::Init()

// TODO: Initialize the global GroupKeyStore object here (#1266)

#if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

{
FactoryProvisioning factoryProv;
uint8_t * const kInternalSRAM12Start = (uint8_t *) 0x3FFAE000;
uint8_t * const kInternalSRAM12End = kInternalSRAM12Start + (328 * 1024) - 1;

// Scan ESP32 Internal SRAM regions 1 and 2 for injected provisioning data and save
// to persistent storage if found.
err = factoryProv.ProvisionDeviceFromRAM(kInternalSRAM12Start, kInternalSRAM12End);
SuccessOrExit(err);
}

#endif // CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

err = CHIP_NO_ERROR;

exit:
Expand Down
17 changes: 0 additions & 17 deletions src/platform/Zephyr/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
#include <lib/core/CHIPVendorIdentifiers.hpp>
#include <platform/Zephyr/ZephyrConfig.h>

#if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
#include <platform/internal/FactoryProvisioning.ipp>
#endif // CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

#include <lib/support/CodeUtils.h>
#include <lib/support/logging/CHIPLogging.h>

Expand All @@ -56,19 +52,6 @@ CHIP_ERROR ConfigurationManagerImpl::Init()
err = Internal::GenericConfigurationManagerImpl<ZephyrConfig>::Init();
SuccessOrExit(err);

// TODO: Initialize the global GroupKeyStore object here
#if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
{
FactoryProvisioning factoryProv;
uint8_t * const kDeviceRAMStart = (uint8_t *) CONFIG_SRAM_BASE_ADDRESS;
uint8_t * const kDeviceRAMEnd = kDeviceRAMStart + CONFIG_SRAM_SIZE * 1024 - 1;

// Scan device RAM for injected provisioning data and save to persistent storage if found.
err = factoryProv.ProvisionDeviceFromRAM(kDeviceRAMStart, kDeviceRAMEnd);
SuccessOrExit(err);
}
#endif // CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

if (ZephyrConfig::ConfigValueExists(ZephyrConfig::kCounterKey_RebootCount))
{
err = GetRebootCount(rebootCount);
Expand Down
15 changes: 0 additions & 15 deletions src/platform/bouffalolab/BL602/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,6 @@ CHIP_ERROR ConfigurationManagerImpl::Init()
err = Internal::GenericConfigurationManagerImpl<BL602Config>::Init();
SuccessOrExit(err);

#if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

{
FactoryProvisioning factoryProv;
uint8_t * const kInternalSRAM12Start = (uint8_t *) 0x3FFAE000;
uint8_t * const kInternalSRAM12End = kInternalSRAM12Start + (328 * 1024) - 1;

// Scan ESP32 Internal SRAM regions 1 and 2 for injected provisioning data and save
// to persistent storage if found.
err = factoryProv.ProvisionDeviceFromRAM(kInternalSRAM12Start, kInternalSRAM12End);
SuccessOrExit(err);
}

#endif // CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

// If the fail-safe was armed when the device last shutdown, initiate a factory reset.
if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed)
{
Expand Down
4 changes: 0 additions & 4 deletions src/platform/qpg/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
#include <lib/core/CHIPVendorIdentifiers.hpp>
#include <platform/qpg/qpgConfig.h>

#if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
#include <platform/internal/FactoryProvisioning.ipp>
#endif // CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING

#include <lib/support/CodeUtils.h>
#include <lib/support/logging/CHIPLogging.h>

Expand Down

0 comments on commit 2085690

Please sign in to comment.