diff options
-rw-r--r-- | board/xilinx/common/board.c | 4 | ||||
-rw-r--r-- | board/xilinx/microblaze-generic/microblaze-generic.c | 15 |
2 files changed, 5 insertions, 14 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 857a66a..bcdd3ae 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -373,7 +373,7 @@ int board_late_init_xilinx(void) phys_size_t bootm_size = gd->ram_size; struct bd_info *bd = gd->bd; - if (bd->bi_dram[0].start) { + if (!CONFIG_IS_ENABLED(MICROBLAZE) && bd->bi_dram[0].start) { ulong scriptaddr; scriptaddr = env_get_hex("scriptaddr", 0); @@ -381,7 +381,7 @@ int board_late_init_xilinx(void) bd->bi_dram[0].start + scriptaddr); } - if (CONFIG_IS_ENABLED(ARCH_ZYNQ)) + if (CONFIG_IS_ENABLED(ARCH_ZYNQ) || CONFIG_IS_ENABLED(MICROBLAZE)) bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M)); ret |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index c1ae8fb..e590999 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -18,6 +18,7 @@ #include <dm/lists.h> #include <fdtdec.h> #include <linux/sizes.h> +#include "../common/board.h" DECLARE_GLOBAL_DATA_PTR; @@ -36,7 +37,7 @@ int dram_init(void) int board_late_init(void) { - ulong max_size, lowmem_size; + ulong max_size; u32 status = 0; #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE) @@ -56,14 +57,6 @@ int board_late_init(void) max_size = gd->start_addr_sp - CONFIG_STACK_SIZE; max_size = round_down(max_size, SZ_16M); - /* Linux default LOWMEM_SIZE is 0x30000000 = 768MB */ - lowmem_size = gd->ram_base + 768 * 1024 * 1024; - - status |= env_set_addr("initrd_high", (void *)min_t(ulong, max_size, - lowmem_size)); - status |= env_set_addr("fdt_high", (void *)min_t(ulong, max_size, - lowmem_size)); - status |= env_set_hex("scriptaddr", max_size + SZ_2M); status |= env_set_hex("pxefile_addr_r", max_size + SZ_1M); @@ -75,10 +68,8 @@ int board_late_init(void) status |= env_set_hex("ramdisk_addr_r", gd->ram_base + SZ_32M + SZ_4M + SZ_2M); - status |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); - if (status) printf("%s: Saving run time variables FAILED\n", __func__); - return 0; + return board_late_init_xilinx(); } |