]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - arch/arm/cpu/arm926ejs/davinci/spl.c
3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/u-boot.h>
11 #include <asm/utils.h>
13 #include <asm/arch/dm365_lowlevel.h>
16 #include <spi_flash.h>
19 DECLARE_GLOBAL_DATA_PTR
;
21 #ifndef CONFIG_SPL_LIBCOMMON_SUPPORT
22 void puts(const char *str
)
31 NS16550_putc((NS16550_t
)(CONFIG_SYS_NS16550_COM1
), '\r');
33 NS16550_putc((NS16550_t
)(CONFIG_SYS_NS16550_COM1
), c
);
35 #endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */
37 void board_init_f(ulong dummy
)
39 /* First, setup our stack pointer. */
40 asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK
));
42 /* Second, perform our low-level init. */
43 #ifdef CONFIG_SOC_DM365
44 dm36x_lowlevel_init(0);
46 #ifdef CONFIG_SOC_DA8XX
50 /* Third, we clear the BSS. */
51 memset(__bss_start
, 0, __bss_end
- __bss_start
);
53 /* Finally, setup gd and move to the next step. */
55 board_init_r(NULL
, 0);
58 void spl_board_init(void)
60 preloader_console_init();
63 u32
spl_boot_mode(void)
65 return MMCSD_MODE_RAW
;
68 u32
spl_boot_device(void)
70 #ifdef CONFIG_SPL_NAND_SIMPLE
71 return BOOT_DEVICE_NAND
;
72 #elif defined(CONFIG_SPL_SPI_LOAD)
73 return BOOT_DEVICE_SPI
;
74 #elif defined(CONFIG_SPL_MMC_LOAD)
75 return BOOT_DEVICE_MMC1
;
77 puts("Unknown boot device\n");