blob: 42f3863b92c32438f6e2c729af8c5c5c355d3b03 [file] [log] [blame]
Fabien Parent2e50d822019-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 Parenteae9c7f2020-10-16 17:40:07 +02007#include <dm.h>
Fabien Parentaed44902021-02-15 19:07:45 +01008#include <net.h>
Fabien Parent2e50d822019-07-18 19:08:09 +02009
10int board_init(void)
11{
12 return 0;
13}
Fabien Parenteae9c7f2020-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 Parentaed44902021-02-15 19:07:45 +010028 if (CONFIG_IS_ENABLED(USB_ETHER))
29 usb_ether_init();
30
Fabien Parenteae9c7f2020-10-16 17:40:07 +020031 return 0;
32}