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)
40 * Pin muxing needs to be done before UART output, since
41 * on A38x the UART pins need some re-muxing for output
46 /* Example code showing how to enable the debug UART on MVEBU */
49 * Debug UART can be used from here if required:
54 * printascii("string");
60 debug("spl_init() failed: %d\n", ret);
64 /* Use special translation offset for SPL */
65 dm_set_translation_offset(0xd0000000 - 0xf1000000);
67 preloader_console_init();
71 /* First init the serdes PHY's */
77 #ifdef CONFIG_MVEBU_BOOTROM_UARTBOOT
79 * Return to the BootROM to continue the Marvell xmodem
80 * UART boot protocol. As initiated by the kwboot tool.
82 * This can only be done by the BootROM and not by the
83 * U-Boot SPL infrastructure, since the beginning of the
84 * image is already read and interpreted by the BootROM.
85 * SPL has no chance to receive this information. So we
86 * need to return to the BootROM to enable this xmodem