]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - test/dm/ram.c
dm: gpio: hi6220: Add a hi6220 GPIO driver model driver.
[karo-tx-uboot.git] / test / dm / ram.c
1 /*
2  * Copyright (C) 2015 Google, Inc
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <dm.h>
9 #include <ram.h>
10 #include <dm/test.h>
11 #include <test/ut.h>
12
13 DECLARE_GLOBAL_DATA_PTR;
14
15 /* Basic test of the ram uclass */
16 static int dm_test_ram_base(struct unit_test_state *uts)
17 {
18         struct udevice *dev;
19         struct ram_info info;
20
21         ut_assertok(uclass_get_device(UCLASS_RAM, 0, &dev));
22         ut_assertok(ram_get_info(dev, &info));
23         ut_asserteq(0, info.base);
24         ut_asserteq(gd->ram_size, info.size);
25
26         return 0;
27 }
28 DM_TEST(dm_test_ram_base, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);