Skip to content

Commit 6191cef

Browse files
ananglcarlescufi
authored andcommitted
tests: benchmarks: Add support for "jedec,mspi-nor" flash devices
... so that the tests can be built for nRF54H20 and nRF9280 after they are switched to use the new MSPI driver for EXMIF. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent b757e57 commit 6191cef

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/benchmarks/peripheral_load/src/flash_thread.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ LOG_MODULE_REGISTER(flash_thd, LOG_LEVEL_INF);
1313

1414
#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor)
1515
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_spi_nor)
16+
#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor)
17+
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_mspi_nor)
1618
#elif DT_HAS_COMPAT_STATUS_OKAY(nordic_qspi_nor)
1719
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nordic_qspi_nor)
1820
#else

tests/benchmarks/power_consumption/flash/src/driver_test.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,20 @@
88
#include <zephyr/storage/flash_map.h>
99
#include <zephyr/kernel.h>
1010

11+
#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor)
12+
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_spi_nor)
13+
#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor)
14+
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_mspi_nor)
15+
#else
16+
#error Unsupported flash driver
17+
#define FLASH_NODE DT_INVALID_NODE
18+
#endif
19+
1120
#define TEST_AREA_OFFSET 0xff000
1221
#define EXPECTED_SIZE 512
1322
uint8_t buf[EXPECTED_SIZE];
1423

15-
static const struct device *flash_dev = DEVICE_DT_GET(DT_INST(0, jedec_spi_nor));
24+
static const struct device *flash_dev = DEVICE_DT_GET(FLASH_NODE);
1625

1726

1827
void thread_definition(void)

0 commit comments

Comments
 (0)