diff options
| author | Tom Rini <[email protected]> | 2021-10-31 12:21:12 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-10-31 12:21:12 -0400 |
| commit | 50bff6a6f86669a8652e2bf271eeb04f77911274 (patch) | |
| tree | 2ab5f207ca3c191e5c1e67f66459d3b4a6f3fb0a /test | |
| parent | a09929cc6c5a108f89e91660f37d745ed119385b (diff) | |
| parent | 3e2095e960b47a3c0211a3a1e52c74b1761cb0be (diff) | |
Merge branch '2021-10-31-assorted-platform-updates'
- Revert GIC LPI changes that need to be reworked.
- mvebu SATA booting bugfix
- Samsung Galaxy S9/S9+(SM-G96x0), Samsung Galaxy A and Apple M1
platform support.
Diffstat (limited to 'test')
| -rw-r--r-- | test/dm/Makefile | 1 | ||||
| -rw-r--r-- | test/dm/iommu.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/dm/Makefile b/test/dm/Makefile index 55162e9499d..7de013f6368 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_DM_I2C) += i2c.o obj-$(CONFIG_SOUND) += i2s.o obj-y += irq.o obj-$(CONFIG_CLK_K210_SET_RATE) += k210_pll.o +obj-$(CONFIG_IOMMU) += iommu.o obj-$(CONFIG_LED) += led.o obj-$(CONFIG_DM_MAILBOX) += mailbox.o obj-$(CONFIG_DM_MDIO) += mdio.o diff --git a/test/dm/iommu.c b/test/dm/iommu.c new file mode 100644 index 00000000000..94174a7482b --- /dev/null +++ b/test/dm/iommu.c @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2021 Mark Kettenis <[email protected]> + */ + +#include <common.h> +#include <dm.h> +#include <dm/test.h> +#include <dm/uclass-internal.h> +#include <iommu.h> +#include <test/test.h> +#include <test/ut.h> + +static int dm_test_iommu(struct unit_test_state *uts) +{ + struct udevice *dev; + + ut_assertok(uclass_find_device(UCLASS_IOMMU, 0, &dev)); + ut_assert(!(dev_get_flags(dev) & DM_FLAG_ACTIVATED)); + + /* Probing USB probes the IOMMU through the "iommus" property */ + ut_assertok(uclass_probe_all(UCLASS_USB)); + ut_assert(dev_get_flags(dev) & DM_FLAG_ACTIVATED); + + return 0; +} + +DM_TEST(dm_test_iommu, UT_TESTF_SCAN_FDT); |
