From 8a4289ad727a1a6b47b5690e7b3c0fde64f3aebf Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 23 Aug 2023 02:18:20 +0200 Subject: [PATCH] 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 --- drivers/mtd/nvmxip/nvmxip-uclass.c | 4 ---- test/dm/nvmxip.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nvmxip/nvmxip-uclass.c b/drivers/mtd/nvmxip/nvmxip-uclass.c index 36eb056c21..9a316d1de3 100644 --- a/drivers/mtd/nvmxip/nvmxip-uclass.c +++ b/drivers/mtd/nvmxip/nvmxip-uclass.c @@ -29,10 +29,6 @@ int nvmxip_probe(struct udevice *udev) 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 89bf481f61..f0ad47d4ef 100644 --- a/test/dm/nvmxip.c +++ b/test/dm/nvmxip.c @@ -103,6 +103,8 @@ static int dm_test_nvmxip(struct unit_test_state *uts) 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); -- 2.39.5