]> Git Repo - J-u-boot.git/blob - test/dm/qfw.c
Merge patch series "FWU: Add support for FWU metadata version 2"
[J-u-boot.git] / test / dm / qfw.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright 2021 Asherah Connor <[email protected]>
4  */
5
6 #include <qfw.h>
7 #include <dm.h>
8 #include <asm/test.h>
9 #include <dm/test.h>
10 #include <test/ut.h>
11
12 /*
13  * Exercise the device enough to be satisfied the initialisation and DMA
14  * interfaces work.
15  */
16
17 static int dm_test_qfw_cpus(struct unit_test_state *uts)
18 {
19         struct udevice *dev;
20
21         ut_assertok(uclass_first_device_err(UCLASS_QFW, &dev));
22         ut_asserteq(5, qfw_online_cpus(dev));
23
24         return 0;
25 }
26
27 DM_TEST(dm_test_qfw_cpus, UT_TESTF_SCAN_PDATA);
28
29 static int dm_test_qfw_firmware_list(struct unit_test_state *uts)
30 {
31         struct udevice *dev;
32         struct fw_file *file;
33
34         ut_assertok(uclass_first_device_err(UCLASS_QFW, &dev));
35         ut_assertok(qfw_read_firmware_list(dev));
36         ut_assertok_ptr((file = qfw_find_file(dev, "test-one")));
37
38         return 0;
39 }
40
41 DM_TEST(dm_test_qfw_firmware_list, UT_TESTF_SCAN_PDATA);
This page took 0.024592 seconds and 4 git commands to generate.