blob: 1b8736966f616690e7d1da459d7e6b6798004cda [file] [log] [blame]
Fabien Parente5c1e622021-02-15 19:21:12 +01001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2020 BayLibre SAS
4 * Author: Fabien Parent <fparent@baylibre.com>
5 */
6
Fabien Parente5c1e622021-02-15 19:21:12 +01007#include <dm.h>
8#include <net.h>
9
10int 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}