]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers/mtd/nvmxip: Move sandbox_set_enable_memio() to test
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 23 Aug 2023 00:18:20 +0000 (02:18 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 30 Aug 2023 21:56:21 +0000 (17:56 -0400)
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>
drivers/mtd/nvmxip/nvmxip-uclass.c
test/dm/nvmxip.c

index 36eb056c213e1c3bf3672a926bf0a445efc7ef18..9a316d1de397e6e60e9a89f4ef77e4f18eaabaa6 100644 (file)
@@ -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);
 
index 89bf481f61617d22a734758a6566fe3cc03c3e49..f0ad47d4efe9313e480154f1da5e34c06db40eb4 100644 (file)
@@ -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);