diff options
Diffstat (limited to 'roms/u-boot/test/dm/cache.c')
-rw-r--r-- | roms/u-boot/test/dm/cache.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/roms/u-boot/test/dm/cache.c b/roms/u-boot/test/dm/cache.c new file mode 100644 index 000000000..bbd8f98d0 --- /dev/null +++ b/roms/u-boot/test/dm/cache.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Intel Corporation <www.intel.com> + */ + +#include <common.h> +#include <dm.h> +#include <dm/test.h> + +static int dm_test_reset(struct unit_test_state *uts) +{ + struct udevice *dev_cache; + struct cache_info; + + ut_assertok(uclass_get_device(UCLASS_CACHE, 0, &dev_cache)); + ut_assertok(cache_get_info(dev, &info)); + ut_assertok(cache_enable(dev)); + ut_assertok(cache_disable(dev)); + + return 0; +} +DM_TEST(dm_test_reset, UT_TESTF_SCAN_FDT); |