Merge tag 'dm-pull-6oct20' of git://git.denx.de/u-boot-dm
[platform/kernel/u-boot.git] / arch / mips / mach-octeon / dram.c
1 // 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
11 DECLARE_GLOBAL_DATA_PTR;
12
13 int 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
25 ulong board_get_usable_ram_top(ulong total_size)
26 {
27         return gd->ram_top;
28 }