blob: 930bfec34836e9defc02611fce2ac2f31df1b34c [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
Fabien Parenteae9c7f2020-10-16 17:40:07 +02006#include <dm.h>
Fabien Parentaed44902021-02-15 19:07:45 +01007#include <net.h>
Fabien Parent2e50d822019-07-18 19:08:09 +02008
9int board_init(void)
10{
11 return 0;
12}
Fabien Parenteae9c7f2020-10-16 17:40:07 +020013
14int board_late_init(void)
15{
16 struct udevice *dev;
17 int ret;
18
19 if (CONFIG_IS_ENABLED(USB_GADGET)) {
20 ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev);
21 if (ret) {
22 pr_err("%s: Cannot find USB device\n", __func__);
23 return ret;
24 }
25 }
26
Fabien Parentaed44902021-02-15 19:07:45 +010027 if (CONFIG_IS_ENABLED(USB_ETHER))
28 usb_ether_init();
29
Fabien Parenteae9c7f2020-10-16 17:40:07 +020030 return 0;
31}