1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020 MediaTek Inc. All Rights Reserved.
11 #include <asm/sections.h>
12 #include <linux/libfdt.h>
13 #include <linux/sizes.h>
14 #include <mach/serial.h>
16 void __noreturn board_init_f(ulong dummy)
20 #ifdef CONFIG_SPL_SERIAL_SUPPORT
22 * mtmips_spl_serial_init() is useful if debug uart is enabled,
23 * or DM based serial is not enabled.
25 mtmips_spl_serial_init();
26 preloader_console_init();
29 board_init_r(NULL, 0);
32 void board_boot_order(u32 *spl_boot_list)
34 spl_boot_list[0] = BOOT_DEVICE_NOR;
37 unsigned long spl_nor_get_uboot_base(void)
39 void *uboot_base = __image_copy_end;
41 if (fdt_magic(uboot_base) == FDT_MAGIC)
42 return (unsigned long)uboot_base + fdt_totalsize(uboot_base);
44 return (unsigned long)uboot_base;