drivers/mtd/nvmxip: Move sandbox_set_enable_memio() to test
The sandbox_set_enable_memio() should only ever be set during
sandbox testing, not within driver itself, move it back to test/ .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
diff --git a/drivers/mtd/nvmxip/nvmxip-uclass.c b/drivers/mtd/nvmxip/nvmxip-uclass.c
index 36eb056..9a316d1 100644
--- a/drivers/mtd/nvmxip/nvmxip-uclass.c
+++ b/drivers/mtd/nvmxip/nvmxip-uclass.c
@@ -29,10 +29,6 @@
char bdev_name[NVMXIP_BLKDEV_NAME_SZ + 1];
int devnum;
-#if CONFIG_IS_ENABLED(SANDBOX64)
- sandbox_set_enable_memio(true);
-#endif
-
devnum = uclass_id_count(UCLASS_NVMXIP);
snprintf(bdev_name, NVMXIP_BLKDEV_NAME_SZ, "blk#%d", devnum);
diff --git a/test/dm/nvmxip.c b/test/dm/nvmxip.c
index 89bf481..f0ad47d 100644
--- a/test/dm/nvmxip.c
+++ b/test/dm/nvmxip.c
@@ -103,6 +103,8 @@
void *buffer = NULL;
unsigned long flashsz;
+ sandbox_set_enable_memio(true);
+
/* set the flash content first for both devices */
dm_nvmxip_flash_sanity(uts, 0, NULL);
dm_nvmxip_flash_sanity(uts, 1, NULL);