]> git.ipfire.org Git - thirdparty/u-boot.git/blame - test/dm/ram.c
test: Remove <common.h> and add needed includes
[thirdparty/u-boot.git] / test / dm / ram.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
64ce0cad
SG
2/*
3 * Copyright (C) 2015 Google, Inc
64ce0cad
SG
4 */
5
64ce0cad
SG
6#include <dm.h>
7#include <ram.h>
401d1c4f 8#include <asm/global_data.h>
64ce0cad 9#include <dm/test.h>
0e1fad43 10#include <test/test.h>
64ce0cad
SG
11#include <test/ut.h>
12
13DECLARE_GLOBAL_DATA_PTR;
14
15/* Basic test of the ram uclass */
16static 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}
e180c2b1 28DM_TEST(dm_test_ram_base, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);