developer | 862f505 | 2019-11-07 19:28:44 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2019 MediaTek Inc. |
| 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <dm.h> |
| 8 | |
| 9 | DECLARE_GLOBAL_DATA_PTR; |
| 10 | |
| 11 | int 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 | } |
developer | cabebda | 2020-01-16 16:11:38 +0800 | [diff] [blame^] | 19 | |
| 20 | int 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 | } |