blob: 72284a2689887bee4f3961064d6e2e6b0ce63591 [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>
Simon Glass97589732020-05-10 11:40:02 -06008#include <init.h>
developer862f5052019-11-07 19:28:44 +08009
10DECLARE_GLOBAL_DATA_PTR;
11
12int board_init(void)
13{
14 /* address of boot parameters */
15 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
16
17 debug("gd->fdt_blob is %p\n", gd->fdt_blob);
18 return 0;
19}
developercabebda2020-01-16 16:11:38 +080020
21int board_late_init(void)
22{
23#ifdef CONFIG_USB_GADGET
24 struct udevice *dev;
25 int ret;
26#endif
27
28#ifdef CONFIG_USB_GADGET
29 ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
30 if (ret) {
31 pr_err("%s: Cannot find USB device\n", __func__);
32 return ret;
33 }
34#endif
35
36 return 0;
37}