Stefan Roese | b0f80b9 | 2015-01-19 11:33:42 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | DECLARE_GLOBAL_DATA_PTR; |
| 14 | |
| 15 | u32 spl_boot_device(void) |
| 16 | { |
| 17 | /* Right now only booting via SPI NOR flash is supported */ |
| 18 | return BOOT_DEVICE_SPI; |
| 19 | } |
| 20 | |
| 21 | void 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 | |
| 29 | preloader_console_init(); |
| 30 | |
| 31 | /* First init the serdes PHY's */ |
| 32 | serdes_phy_config(); |
| 33 | |
| 34 | /* Setup DDR */ |
| 35 | ddr3_init(); |
| 36 | |
| 37 | board_init_r(NULL, 0); |
| 38 | } |