microblaze: Remove unused variable ram_base
[platform/kernel/u-boot.git] / board / xilinx / microblaze-generic / microblaze-generic.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2007-2018 Michal Simek
4  *
5  * Michal SIMEK <monstr@monstr.eu>
6  */
7
8 /*
9  * This is a board specific file.  It's OK to include board specific
10  * header files
11  */
12
13 #include <common.h>
14 #include <config.h>
15 #include <dm.h>
16 #include <dm/lists.h>
17 #include <fdtdec.h>
18 #include <asm/processor.h>
19 #include <asm/microblaze_intc.h>
20 #include <asm/asm.h>
21 #include <asm/gpio.h>
22 #include <dm/uclass.h>
23 #include <wdt.h>
24
25 DECLARE_GLOBAL_DATA_PTR;
26
27 int dram_init_banksize(void)
28 {
29         return fdtdec_setup_memory_banksize();
30 }
31
32 int dram_init(void)
33 {
34         if (fdtdec_setup_mem_size_base() != 0)
35                 return -EINVAL;
36
37         return 0;
38 };
39
40 int board_late_init(void)
41 {
42 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE)
43         int ret;
44
45         ret = device_bind_driver(gd->dm_root, "mb_soft_reset",
46                                  "reset_soft", NULL);
47         if (ret)
48                 printf("Warning: No reset driver: ret=%d\n", ret);
49 #endif
50         return 0;
51 }