Skip to content

Commit

Permalink
Revert "tests: benchmarks: multicore: idle_spim_loopback: Disable GD2…
Browse files Browse the repository at this point in the history
… and GD3"

This reverts commit a6f9541.
  • Loading branch information
nordic-segl committed Nov 7, 2024
1 parent 9f3bde3 commit 917f366
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ CONFIG_SERIAL=n

CONFIG_SPI=y
CONFIG_ASSERT=y
CONFIG_NRFS=y
53 changes: 0 additions & 53 deletions tests/benchmarks/multicore/idle_spim_loopback/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ LOG_MODULE_REGISTER(idle_spim_loopback, LOG_LEVEL_INF);
#include <zephyr/linker/devicetree_regions.h>
#include <zephyr/pm/device_runtime.h>

#include <nrfs_backend_ipc_service.h>
#include <nrfs_gdpwr.h>

#define DELTA (1)

#define SPI_MODE (SPI_OP_MODE_MASTER | SPI_WORD_SET(8) | SPI_LINES_SINGLE | SPI_TRANSFER_MSB \
Expand All @@ -40,53 +37,6 @@ void my_timer_handler(struct k_timer *dummy)
timer_expired = true;
}

/* Required to power off the GD2 and GD3 domains
* Will be removed when GD handling
* is implemented in sdk-zephyr
*/
static void gdpwr_handler(nrfs_gdpwr_evt_t const *p_evt, void *context)
{
switch (p_evt->type) {
case NRFS_GDPWR_REQ_APPLIED:
printk("GDPWR handler - response received: 0x%x, CTX=%d\n", p_evt->type,
(uint32_t)context);
break;
case NRFS_GDPWR_REQ_REJECTED:
printk("GDPWR handler - request rejected: 0x%x, CTX=%d\n", p_evt->type,
(uint32_t)context);
break;
default:
printk("GDPWR handler - unexpected event: 0x%x, CTX=%d\n", p_evt->type,
(uint32_t)context);
break;
}
}

/* Required to power off the GD2 and GD3 domains
* Will be removed when GD handling
* is implemented in sdk-zephyr
*/
static void clear_global_power_domains_requests(void)
{
int service_status;
int tst_ctx = 1;

service_status = nrfs_gdpwr_init(gdpwr_handler);
printk("Response: %d\n", service_status);
printk("Sending GDPWR DISABLE request for: GDPWR_POWER_DOMAIN_ACTIVE_SLOW\n");
service_status = nrfs_gdpwr_power_request(GDPWR_POWER_DOMAIN_ACTIVE_SLOW,
GDPWR_POWER_REQUEST_CLEAR, (void *)tst_ctx++);
printk("Response: %d\n", service_status);
printk("Sending GDPWR DISABLE request for: GDPWR_POWER_DOMAIN_ACTIVE_FAST\n");
service_status = nrfs_gdpwr_power_request(GDPWR_POWER_DOMAIN_ACTIVE_FAST,
GDPWR_POWER_REQUEST_CLEAR, (void *)tst_ctx++);
printk("Response: %d\n", service_status);
printk("Sending GDPWR DISABLE request for: GDPWR_POWER_DOMAIN_MAIN_SLOW\n");
service_status = nrfs_gdpwr_power_request(GDPWR_POWER_DOMAIN_MAIN_SLOW,
GDPWR_POWER_REQUEST_CLEAR, (void *)tst_ctx);
printk("Response: %d\n", service_status);
}

int main(void)
{
int ret;
Expand All @@ -113,9 +63,6 @@ int main(void)
.count = 1
};

nrfs_backend_wait_for_connection(K_FOREVER);
clear_global_power_domains_requests();

LOG_INF("%s runs as a SPI HOST", CONFIG_BOARD_TARGET);
LOG_INF("%d bytes of data exchanged at once", CONFIG_DATA_FIELD);

Expand Down

0 comments on commit 917f366

Please sign in to comment.