mirror of
https://github.com/smaeul/u-boot.git
synced 2025-11-18 01:40:58 +00:00
This commit is contained in:
commit
6d73175b1f
@ -14,6 +14,7 @@
|
|||||||
#include <dm/device-internal.h>
|
#include <dm/device-internal.h>
|
||||||
#include <dm/lists.h>
|
#include <dm/lists.h>
|
||||||
#include <dwc3-uboot.h>
|
#include <dwc3-uboot.h>
|
||||||
|
#include <generic-phy.h>
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/usb/ch9.h>
|
#include <linux/usb/ch9.h>
|
||||||
@ -460,6 +461,17 @@ static int dwc3_glue_probe(struct udevice *dev)
|
|||||||
struct udevice *child = NULL;
|
struct udevice *child = NULL;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
struct phy phy;
|
||||||
|
|
||||||
|
ret = generic_phy_get_by_name(dev, "usb3-phy", &phy);
|
||||||
|
if (!ret) {
|
||||||
|
ret = generic_phy_init(&phy);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
} else if (ret != -ENOENT) {
|
||||||
|
debug("could not get phy (err %d)\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
glue->regs = dev_read_addr(dev);
|
glue->regs = dev_read_addr(dev);
|
||||||
|
|
||||||
@ -471,6 +483,12 @@ static int dwc3_glue_probe(struct udevice *dev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
if (phy.dev) {
|
||||||
|
ret = generic_phy_power_on(&phy);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
ret = device_find_first_child(dev, &child);
|
ret = device_find_first_child(dev, &child);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@ -48,6 +48,7 @@ static const struct r8152_dongle r8152_dongles[] = {
|
|||||||
|
|
||||||
/* TP-LINK */
|
/* TP-LINK */
|
||||||
{ 0x2357, 0x0601 },
|
{ 0x2357, 0x0601 },
|
||||||
|
{ 0x2357, 0x0602 },
|
||||||
|
|
||||||
/* Nvidia */
|
/* Nvidia */
|
||||||
{ 0x0955, 0x09ff },
|
{ 0x0955, 0x09ff },
|
||||||
@ -1885,6 +1886,7 @@ static const struct usb_device_id r8152_eth_id_table[] = {
|
|||||||
|
|
||||||
/* TP-LINK */
|
/* TP-LINK */
|
||||||
{ USB_DEVICE(0x2357, 0x0601) },
|
{ USB_DEVICE(0x2357, 0x0601) },
|
||||||
|
{ USB_DEVICE(0x2357, 0x0602) },
|
||||||
|
|
||||||
/* Nvidia */
|
/* Nvidia */
|
||||||
{ USB_DEVICE(0x0955, 0x09ff) },
|
{ USB_DEVICE(0x0955, 0x09ff) },
|
||||||
|
|||||||
@ -94,11 +94,11 @@ static struct usb_request *
|
|||||||
ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags);
|
ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags);
|
||||||
static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *_req);
|
static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *_req);
|
||||||
|
|
||||||
static struct usb_gadget_ops ci_udc_ops = {
|
static const struct usb_gadget_ops ci_udc_ops = {
|
||||||
.pullup = ci_pullup,
|
.pullup = ci_pullup,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct usb_ep_ops ci_ep_ops = {
|
static const struct usb_ep_ops ci_ep_ops = {
|
||||||
.enable = ci_ep_enable,
|
.enable = ci_ep_enable,
|
||||||
.disable = ci_ep_disable,
|
.disable = ci_ep_disable,
|
||||||
.queue = ci_ep_queue,
|
.queue = ci_ep_queue,
|
||||||
|
|||||||
@ -155,7 +155,7 @@ struct phy_bulk {
|
|||||||
unsigned int count;
|
unsigned int count;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_PHY
|
#if CONFIG_IS_ENABLED(PHY)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* generic_phy_init() - initialize the PHY port
|
* generic_phy_init() - initialize the PHY port
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user