Dinh Nguyen | 84b124d | 2019-04-23 16:55:03 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2019 Intel Corporation <www.intel.com> |
| 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <dm.h> |
| 8 | #include <dm/test.h> |
| 9 | |
| 10 | static int dm_test_reset(struct unit_test_state *uts) |
| 11 | { |
| 12 | struct udevice *dev_cache; |
| 13 | struct cache_info; |
| 14 | |
| 15 | ut_assertok(uclass_get_device(UCLASS_CACHE, 0, &dev_cache)); |
| 16 | ut_assertok(cache_get_info(dev, &info)); |
Rick Chen | abd858e | 2019-08-28 18:46:05 +0800 | [diff] [blame^] | 17 | ut_assertok(cache_enable(dev)); |
| 18 | ut_assertok(cache_disable(dev)); |
Dinh Nguyen | 84b124d | 2019-04-23 16:55:03 -0500 | [diff] [blame] | 19 | |
| 20 | return 0; |
| 21 | } |
| 22 | DM_TEST(dm_test_reset, DM_TESTF_SCAN_FDT); |