Fabien Parent | 2e50d82 | 2019-07-18 19:08:09 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2019 BayLibre SAS |
| 4 | */ |
| 5 | |
| 6 | #include <common.h> |
Fabien Parent | eae9c7f | 2020-10-16 17:40:07 +0200 | [diff] [blame] | 7 | #include <dm.h> |
Fabien Parent | aed4490 | 2021-02-15 19:07:45 +0100 | [diff] [blame] | 8 | #include <net.h> |
Fabien Parent | 2e50d82 | 2019-07-18 19:08:09 +0200 | [diff] [blame] | 9 | |
| 10 | int board_init(void) |
| 11 | { |
| 12 | return 0; |
| 13 | } |
Fabien Parent | eae9c7f | 2020-10-16 17:40:07 +0200 | [diff] [blame] | 14 | |
| 15 | int board_late_init(void) |
| 16 | { |
| 17 | struct udevice *dev; |
| 18 | int ret; |
| 19 | |
| 20 | if (CONFIG_IS_ENABLED(USB_GADGET)) { |
| 21 | ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev); |
| 22 | if (ret) { |
| 23 | pr_err("%s: Cannot find USB device\n", __func__); |
| 24 | return ret; |
| 25 | } |
| 26 | } |
| 27 | |
Fabien Parent | aed4490 | 2021-02-15 19:07:45 +0100 | [diff] [blame] | 28 | if (CONFIG_IS_ENABLED(USB_ETHER)) |
| 29 | usb_ether_init(); |
| 30 | |
Fabien Parent | eae9c7f | 2020-10-16 17:40:07 +0200 | [diff] [blame] | 31 | return 0; |
| 32 | } |