blob: 2ac7c6cd18dbbe004147b48858f834f5f6521732 [file] [log] [blame]
developer862f5052019-11-07 19:28:44 +08001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2019 MediaTek Inc.
4 */
5
6#include <common.h>
7#include <dm.h>
8
9DECLARE_GLOBAL_DATA_PTR;
10
11int board_init(void)
12{
13 /* address of boot parameters */
14 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
15
16 debug("gd->fdt_blob is %p\n", gd->fdt_blob);
17 return 0;
18}
developercabebda2020-01-16 16:11:38 +080019
20int board_late_init(void)
21{
22#ifdef CONFIG_USB_GADGET
23 struct udevice *dev;
24 int ret;
25#endif
26
27#ifdef CONFIG_USB_GADGET
28 ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
29 if (ret) {
30 pr_err("%s: Cannot find USB device\n", __func__);
31 return ret;
32 }
33#endif
34
35 return 0;
36}