]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/powerpc/cpu/ppc4xx/spl_boot.c
drivers, block: remove sil680 driver
[people/ms/u-boot.git] / arch / powerpc / cpu / ppc4xx / spl_boot.c
CommitLineData
98f99e9f
SR
1/*
2 * Copyright (C) 2013 Stefan Roese <sr@denx.de>
3 *
1a459660 4 * SPDX-License-Identifier: GPL-2.0+
98f99e9f
SR
5 */
6
7#include <common.h>
8#include <spl.h>
9
10DECLARE_GLOBAL_DATA_PTR;
11
12/*
13 * Return selected boot device. On PPC4xx its only NOR flash right now.
14 */
15u32 spl_boot_device(void)
16{
17 return BOOT_DEVICE_NOR;
18}
19
20/*
21 * SPL version of board_init_f()
22 */
23void board_init_f(ulong bootflag)
24{
25 /*
26 * First we need to initialize the SDRAM, so that the real
27 * U-Boot or the OS (Linux) can be loaded
28 */
f1683aa7 29 dram_init();
98f99e9f
SR
30
31 /* Clear bss */
32 memset(__bss_start, '\0', __bss_end - __bss_start);
33
34 /*
35 * Init global_data pointer. Has to be done before calling
36 * get_clocks(), as it stores some clock values into gd needed
37 * later on in the serial driver.
38 */
39 /* Pointer is writable since we allocated a register for it */
40 gd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
41 /* Clear initial global data */
42 memset((void *)gd, 0, sizeof(gd_t));
43
44 /*
45 * get_clocks() needs to be called so that the serial driver
46 * works correctly
47 */
48 get_clocks();
49
50 /*
51 * Do rudimental console / serial setup
52 */
53 preloader_console_init();
54
55 /*
56 * Call board_init_r() (SPL framework version) to load and boot
57 * real U-Boot or OS
58 */
59 board_init_r(NULL, 0);
60 /* Does not return!!! */
61}