]> Git Repo - u-boot.git/blob - test/dm/iommu.c
power: pmic: rk8xx: Support sysreset shutdown method
[u-boot.git] / test / dm / iommu.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2021 Mark Kettenis <[email protected]>
4  */
5
6 #include <common.h>
7 #include <dm.h>
8 #include <dm/test.h>
9 #include <dm/uclass-internal.h>
10 #include <iommu.h>
11 #include <test/test.h>
12 #include <test/ut.h>
13
14 static int dm_test_iommu(struct unit_test_state *uts)
15 {
16         struct udevice *dev;
17
18         ut_assertok(uclass_find_device(UCLASS_IOMMU, 0, &dev));
19         ut_assert(!(dev_get_flags(dev) & DM_FLAG_ACTIVATED));
20
21         /* Probing USB probes the IOMMU through the "iommus" property */
22         ut_assertok(uclass_probe_all(UCLASS_USB));
23         ut_assert(dev_get_flags(dev) & DM_FLAG_ACTIVATED);
24
25         return 0;
26 }
27
28 DM_TEST(dm_test_iommu, UT_TESTF_SCAN_FDT);
This page took 0.028661 seconds and 4 git commands to generate.