common: Drop init.h from common header
[pandora-u-boot.git] / board / siemens / capricorn / spl.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright 2018 NXP
4  *
5  * Copyright 2019 Siemens AG
6  *
7  */
8 #include <common.h>
9 #include <init.h>
10 #include <spl.h>
11 #include <dm.h>
12 #include <dm/uclass.h>
13 #include <dm/device.h>
14 #include <dm/uclass-internal.h>
15 #include <dm/device-internal.h>
16
17 DECLARE_GLOBAL_DATA_PTR;
18
19 void spl_board_init(void)
20 {
21         struct udevice *dev;
22
23         uclass_find_first_device(UCLASS_MISC, &dev);
24
25         for (; dev; uclass_find_next_device(&dev)) {
26                 if (device_probe(dev))
27                         continue;
28         }
29
30         arch_cpu_init();
31
32         board_early_init_f();
33
34         timer_init();
35
36         preloader_console_init();
37 }
38
39 void board_init_f(ulong dummy)
40 {
41         /* Clear global data */
42         memset((void *)gd, 0, sizeof(gd_t));
43
44         /* Clear the BSS. */
45         memset(__bss_start, 0, __bss_end - __bss_start);
46
47         board_init_r(NULL, 0);
48 }