blob: 091226133e4fa2c1ae7a2182622951ae8eb74d05 [file] [log] [blame]
Michal Simek26acb3e2014-01-21 07:30:37 +01001/*
2 * (C) Copyright 2013 - 2014 Xilinx, Inc
3 *
4 * Michal Simek <michal.simek@xilinx.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#include <common.h>
10#include <image.h>
11#include <spl.h>
12#include <version.h>
13#include <asm/io.h>
14#include <asm/u-boot.h>
15
16DECLARE_GLOBAL_DATA_PTR;
17
18bool boot_linux;
19
20u32 spl_boot_device(void)
21{
22 return BOOT_DEVICE_NOR;
23}
24
25/* Board initialization after bss clearance */
26void spl_board_init(void)
27{
28 gd = (gd_t *)CONFIG_SPL_STACK_ADDR;
29
30 /* enable console uart printing */
31 preloader_console_init();
32}
33
34#ifdef CONFIG_SPL_OS_BOOT
35void __noreturn jump_to_image_linux(void *arg)
36{
37 debug("Entering kernel arg pointer: 0x%p\n", arg);
38 typedef void (*image_entry_arg_t)(char *, ulong, ulong)
39 __attribute__ ((noreturn));
40 image_entry_arg_t image_entry =
41 (image_entry_arg_t)spl_image.entry_point;
42
43 image_entry(NULL, 0, (ulong)arg);
44}
45#endif /* CONFIG_SPL_OS_BOOT */
46
47int spl_start_uboot(void)
48{
49#ifdef CONFIG_SPL_OS_BOOT
50 if (boot_linux)
51 return 0;
52#endif
53
54 return 1;
55}