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