blob: b6be5c5baa52de08c9af68ff372b49b5afa74996 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2021 Asherah Connor <ashe@kivikakk.ee>
*/
#include <qfw.h>
#include <dm.h>
#include <asm/test.h>
#include <dm/test.h>
#include <test/ut.h>
/*
* Exercise the device enough to be satisfied the initialisation and DMA
* interfaces work.
*/
static int dm_test_qfw_cpus(struct unit_test_state *uts)
{
struct udevice *dev;
ut_assertok(uclass_first_device_err(UCLASS_QFW, &dev));
ut_asserteq(5, qfw_online_cpus(dev));
return 0;
}
DM_TEST(dm_test_qfw_cpus, UTF_SCAN_PDATA);
static int dm_test_qfw_firmware_list(struct unit_test_state *uts)
{
struct udevice *dev;
struct fw_file *file;
ut_assertok(uclass_first_device_err(UCLASS_QFW, &dev));
ut_assertok(qfw_read_firmware_list(dev));
ut_assertok_ptr((file = qfw_find_file(dev, "test-one")));
return 0;
}
DM_TEST(dm_test_qfw_firmware_list, UTF_SCAN_PDATA);
|