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