]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
9d242745 MS |
2 | /* |
3 | * (C) Copyright 2013 - 2014 Xilinx, Inc | |
4 | * | |
5 | * Michal Simek <[email protected]> | |
9d242745 MS |
6 | */ |
7 | ||
8 | #include <common.h> | |
09140113 | 9 | #include <command.h> |
9d242745 MS |
10 | #include <image.h> |
11 | #include <spl.h> | |
9d242745 MS |
12 | #include <asm/io.h> |
13 | #include <asm/u-boot.h> | |
14 | ||
9d242745 MS |
15 | bool boot_linux; |
16 | ||
17 | u32 spl_boot_device(void) | |
18 | { | |
19 | return BOOT_DEVICE_NOR; | |
20 | } | |
21 | ||
22 | /* Board initialization after bss clearance */ | |
23 | void spl_board_init(void) | |
24 | { | |
9d242745 MS |
25 | /* enable console uart printing */ |
26 | preloader_console_init(); | |
27 | } | |
28 | ||
29 | #ifdef CONFIG_SPL_OS_BOOT | |
5bf5250e | 30 | void __noreturn jump_to_image_linux(struct spl_image_info *spl_image) |
9d242745 | 31 | { |
5bf5250e | 32 | debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg); |
9d242745 MS |
33 | typedef void (*image_entry_arg_t)(char *, ulong, ulong) |
34 | __attribute__ ((noreturn)); | |
35 | image_entry_arg_t image_entry = | |
ca12e65c | 36 | (image_entry_arg_t)spl_image->entry_point; |
9d242745 | 37 | |
5bf5250e | 38 | image_entry(NULL, 0, (ulong)spl_image->arg); |
9d242745 MS |
39 | } |
40 | #endif /* CONFIG_SPL_OS_BOOT */ | |
41 | ||
42 | int spl_start_uboot(void) | |
43 | { | |
44 | #ifdef CONFIG_SPL_OS_BOOT | |
45 | if (boot_linux) | |
46 | return 0; | |
47 | #endif | |
48 | ||
49 | return 1; | |
50 | } | |
4a693669 | 51 | |
09140113 | 52 | int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
4a693669 MS |
53 | { |
54 | __asm__ __volatile__ ("mts rmsr, r0;" \ | |
55 | "bra r0"); | |
56 | ||
57 | return 0; | |
58 | } |