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