blob: ff7a59f2ab8a76204ef4fbb6560aa65e6cc121d3 [file] [log] [blame]
Aaron Williams0dc4ab92020-06-30 12:08:56 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) Stefan Roese <sr@denx.de>
4 */
5
6#include <dm.h>
7#include <ram.h>
8#include <asm/global_data.h>
9#include <linux/compat.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13int dram_init(void)
14{
15 /*
16 * No DDR init yet -> run in L2 cache
17 */
18 gd->ram_size = (4 << 20);
19 gd->bd->bi_dram[0].size = gd->ram_size;
20 gd->bd->bi_dram[1].size = 0;
21
22 return 0;
23}
24
25ulong board_get_usable_ram_top(ulong total_size)
26{
27 return gd->ram_top;
28}