]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-mvebu/spl.c
2 * Copyright (C) 2014-2015 Stefan Roese <sr@denx.de>
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <debug_uart.h>
13 #include <asm/arch/cpu.h>
14 #include <asm/arch/soc.h>
16 DECLARE_GLOBAL_DATA_PTR
;
18 u32
spl_boot_device(void)
20 #if defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
21 return BOOT_DEVICE_SPI
;
23 #if defined(CONFIG_SPL_MMC_SUPPORT)
24 return BOOT_DEVICE_MMC1
;
28 #ifdef CONFIG_SPL_MMC_SUPPORT
29 u32
spl_boot_mode(void)
31 return MMCSD_MODE_RAW
;
35 void board_init_f(ulong dummy
)
39 #ifndef CONFIG_MVEBU_BOOTROM_UARTBOOT
41 * Only call arch_cpu_init() when not returning to the
42 * Marvell BootROM, which is done when booting via
43 * the xmodem protocol (kwboot tool). Otherwise the
44 * internal register will get remapped and the BootROM
45 * can't continue to run correctly.
48 /* Linux expects the internal registers to be at 0xf1000000 */
53 * Pin muxing needs to be done before UART output, since
54 * on A38x the UART pins need some re-muxing for output
59 /* Example code showing how to enable the debug UART on MVEBU */
62 * Debug UART can be used from here if required:
67 * printascii("string");
73 debug("spl_init() failed: %d\n", ret
);
77 /* Use special translation offset for SPL */
78 dm_set_translation_offset(0xd0000000 - 0xf1000000);
80 preloader_console_init();
84 /* First init the serdes PHY's */
90 #ifdef CONFIG_MVEBU_BOOTROM_UARTBOOT
92 * Return to the BootROM to continue the Marvell xmodem
93 * UART boot protocol. As initiated by the kwboot tool.
95 * This can only be done by the BootROM and not by the
96 * U-Boot SPL infrastructure, since the beginning of the
97 * image is already read and interpreted by the BootROM.
98 * SPL has no chance to receive this information. So we
99 * need to return to the BootROM to enable this xmodem