blob: db613ebdc4f41398ca43f18d43b9fc4a35923255 [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
7#include <common.h>
8#include <dm.h>
9#include <net.h>
10
11int board_init(void)
12{
13 struct udevice *dev;
14 int ret;
15
16 if (CONFIG_IS_ENABLED(USB_GADGET)) {
17 ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
18 if (ret) {
19 pr_err("%s: Cannot find USB device\n", __func__);
20 return ret;
21 }
22 }
23
24 if (CONFIG_IS_ENABLED(USB_ETHER))
25 usb_ether_init();
26
27 return 0;
28}