blob: 42f3863b92c32438f6e2c729af8c5c5c355d3b03 [file] [log] [blame]
Fabien Parentbb4c5d62019-07-18 19:08:09 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2019 BayLibre SAS
4 */
5
6#include <common.h>
Fabien Parentc2984eb2020-10-16 17:40:07 +02007#include <dm.h>
Fabien Parent4e828d92021-02-15 19:07:45 +01008#include <net.h>
Fabien Parentbb4c5d62019-07-18 19:08:09 +02009
10int board_init(void)
11{
12 return 0;
13}
Fabien Parentc2984eb2020-10-16 17:40:07 +020014
15int 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 Parent4e828d92021-02-15 19:07:45 +010028 if (CONFIG_IS_ENABLED(USB_ETHER))
29 usb_ether_init();
30
Fabien Parentc2984eb2020-10-16 17:40:07 +020031 return 0;
32}