]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/microblaze/cpu/spl.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[thirdparty/u-boot.git] / arch / microblaze / cpu / spl.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
9d242745
MS
2/*
3 * (C) Copyright 2013 - 2014 Xilinx, Inc
4 *
174d7284 5 * Michal Simek <michal.simek@amd.com>
9d242745
MS
6 */
7
09140113 8#include <command.h>
9d242745 9#include <image.h>
f7ae49fc 10#include <log.h>
9d242745 11#include <spl.h>
9d242745 12#include <asm/io.h>
d678a59d 13#include <asm/u-boot.h>
fc7220f0 14#include <linux/stringify.h>
9d242745 15
b3fe1e8f 16void board_boot_order(u32 *spl_boot_list)
9d242745 17{
b3fe1e8f
OP
18 spl_boot_list[0] = BOOT_DEVICE_NOR;
19 spl_boot_list[1] = BOOT_DEVICE_RAM;
20 spl_boot_list[2] = BOOT_DEVICE_SPI;
9d242745
MS
21}
22
23/* Board initialization after bss clearance */
24void spl_board_init(void)
25{
9d242745
MS
26 /* enable console uart printing */
27 preloader_console_init();
28}
29
30#ifdef CONFIG_SPL_OS_BOOT
5bf5250e 31void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
9d242745 32{
5bf5250e 33 debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg);
9d242745
MS
34 typedef void (*image_entry_arg_t)(char *, ulong, ulong)
35 __attribute__ ((noreturn));
36 image_entry_arg_t image_entry =
ca12e65c 37 (image_entry_arg_t)spl_image->entry_point;
9d242745 38
5bf5250e 39 image_entry(NULL, 0, (ulong)spl_image->arg);
9d242745 40}
9d242745
MS
41
42int spl_start_uboot(void)
43{
8e2378e5 44 return 0;
9d242745 45}
4dd5a9fc 46#endif /* CONFIG_SPL_OS_BOOT */
4a693669 47
09140113 48int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
4a693669 49{
fc7220f0
OP
50 __asm__ __volatile__ (
51 "mts rmsr, r0;" \
52 "brai " __stringify(CONFIG_XILINX_MICROBLAZE0_VECTOR_BASE_ADDR));
4a693669
MS
53
54 return 0;
55}