blob: 09241c3a95459ead101775dd6777399a0bc31b82 [file] [log] [blame]
Ralph Siemsene87c8692023-05-12 21:36:56 -04001// SPDX-License-Identifier: GPL-2.0+
2
3#include <common.h>
4#include <dm.h>
5#include <ram.h>
6#include <asm/global_data.h>
7
8DECLARE_GLOBAL_DATA_PTR;
9
10int board_init(void)
11{
12 gd->bd->bi_boot_params = gd->ram_base + 0x100;
13
14 return 0;
15}
16
17int dram_init(void)
18{
19 struct udevice *dev;
20 int err;
21
22 /*
23 * This will end up calling cadence_ddr_probe(),
24 * and will also update gd->ram_size.
25 */
26 err = uclass_get_device(UCLASS_RAM, 0, &dev);
27 if (err)
28 debug("DRAM init failed: %d\n", err);
29
30 return err;
31}