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