]> Git Repo - J-u-boot.git/blame - test/dm/ram.c
Merge branch 'master' of git://git.denx.de/u-boot-sh
[J-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
6#include <common.h>
7#include <dm.h>
8#include <ram.h>
9#include <dm/test.h>
10#include <test/ut.h>
11
12DECLARE_GLOBAL_DATA_PTR;
13
14/* Basic test of the ram uclass */
15static int dm_test_ram_base(struct unit_test_state *uts)
16{
17 struct udevice *dev;
18 struct ram_info info;
19
20 ut_assertok(uclass_get_device(UCLASS_RAM, 0, &dev));
21 ut_assertok(ram_get_info(dev, &info));
22 ut_asserteq(0, info.base);
23 ut_asserteq(gd->ram_size, info.size);
24
25 return 0;
26}
27DM_TEST(dm_test_ram_base, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
This page took 0.236438 seconds and 4 git commands to generate.