blob: e65f6ca03ed6a4c2de85edebe5b283ce29fe3b75 [file] [log] [blame]
Stefan Roeseb0f80b92015-01-19 11:33:42 +01001/*
2 * Copyright (C) 2014 Stefan Roese <sr@denx.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <spl.h>
9#include <asm/io.h>
10#include <asm/arch/cpu.h>
11#include <asm/arch/soc.h>
12
13DECLARE_GLOBAL_DATA_PTR;
14
15u32 spl_boot_device(void)
16{
17 /* Right now only booting via SPI NOR flash is supported */
18 return BOOT_DEVICE_SPI;
19}
20
21void board_init_f(ulong dummy)
22{
23 /* Set global data pointer */
24 gd = &gdata;
25
26 /* Linux expects the internal registers to be at 0xf1000000 */
27 arch_cpu_init();
28
Stefan Roesee3cccf92015-04-17 18:13:06 +020029 /*
30 * Pin muxing needs to be done before UART output, since
31 * on A38x the UART pins need some re-muxing for output
32 * to work.
33 */
34 board_early_init_f();
35
Stefan Roeseb0f80b92015-01-19 11:33:42 +010036 preloader_console_init();
37
Stefan Roeseade741b2015-07-15 15:36:52 +020038 timer_init();
39
Stefan Roeseb0f80b92015-01-19 11:33:42 +010040 /* First init the serdes PHY's */
41 serdes_phy_config();
42
43 /* Setup DDR */
44 ddr3_init();
45
46 board_init_r(NULL, 0);
47}