blob: d3c523d3874a8f3c0d8301dee7a4860c7b0b64b9 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Michal Simek26acb3e2014-01-21 07:30:37 +01002/*
3 * (C) Copyright 2013 - 2014 Xilinx, Inc
4 *
5 * Michal Simek <michal.simek@xilinx.com>
Michal Simek26acb3e2014-01-21 07:30:37 +01006 */
7
8#include <common.h>
9#include <image.h>
10#include <spl.h>
Michal Simek26acb3e2014-01-21 07:30:37 +010011#include <asm/io.h>
12#include <asm/u-boot.h>
13
Michal Simek26acb3e2014-01-21 07:30:37 +010014bool boot_linux;
15
16u32 spl_boot_device(void)
17{
18 return BOOT_DEVICE_NOR;
19}
20
21/* Board initialization after bss clearance */
22void spl_board_init(void)
23{
Michal Simek26acb3e2014-01-21 07:30:37 +010024 /* enable console uart printing */
25 preloader_console_init();
26}
27
28#ifdef CONFIG_SPL_OS_BOOT
Vikas Manocha62b021c2017-04-07 15:38:13 -070029void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
Michal Simek26acb3e2014-01-21 07:30:37 +010030{
Vikas Manocha62b021c2017-04-07 15:38:13 -070031 debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg);
Michal Simek26acb3e2014-01-21 07:30:37 +010032 typedef void (*image_entry_arg_t)(char *, ulong, ulong)
33 __attribute__ ((noreturn));
34 image_entry_arg_t image_entry =
Simon Glassb805c352016-09-24 18:19:54 -060035 (image_entry_arg_t)spl_image->entry_point;
Michal Simek26acb3e2014-01-21 07:30:37 +010036
Vikas Manocha62b021c2017-04-07 15:38:13 -070037 image_entry(NULL, 0, (ulong)spl_image->arg);
Michal Simek26acb3e2014-01-21 07:30:37 +010038}
39#endif /* CONFIG_SPL_OS_BOOT */
40
41int spl_start_uboot(void)
42{
43#ifdef CONFIG_SPL_OS_BOOT
44 if (boot_linux)
45 return 0;
46#endif
47
48 return 1;
49}