Merge branch 'master' of git://git.denx.de/u-boot-usb
This commit is contained in:
@@ -1077,6 +1077,8 @@ static struct usb_gadget_driver composite_driver = {
|
|||||||
*/
|
*/
|
||||||
int usb_composite_register(struct usb_composite_driver *driver)
|
int usb_composite_register(struct usb_composite_driver *driver)
|
||||||
{
|
{
|
||||||
|
int res;
|
||||||
|
|
||||||
if (!driver || !driver->dev || !driver->bind || composite)
|
if (!driver || !driver->dev || !driver->bind || composite)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -1084,7 +1086,11 @@ int usb_composite_register(struct usb_composite_driver *driver)
|
|||||||
driver->name = "composite";
|
driver->name = "composite";
|
||||||
composite = driver;
|
composite = driver;
|
||||||
|
|
||||||
return usb_gadget_register_driver(&composite_driver);
|
res = usb_gadget_register_driver(&composite_driver);
|
||||||
|
if (res != 0)
|
||||||
|
composite = NULL;
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -263,7 +263,9 @@ static void dwc_otg_core_init(struct dwc2_core_regs *regs)
|
|||||||
|
|
||||||
/* Program the ULPI External VBUS bit if needed */
|
/* Program the ULPI External VBUS bit if needed */
|
||||||
#ifdef CONFIG_DWC2_PHY_ULPI_EXT_VBUS
|
#ifdef CONFIG_DWC2_PHY_ULPI_EXT_VBUS
|
||||||
usbcfg |= DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV;
|
usbcfg |= (DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV |
|
||||||
|
DWC2_GUSBCFG_ULPI_INT_VBUS_INDICATOR |
|
||||||
|
DWC2_GUSBCFG_INDICATOR_PASSTHROUGH);
|
||||||
#else
|
#else
|
||||||
usbcfg &= ~DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV;
|
usbcfg &= ~DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -152,6 +152,8 @@ struct dwc2_core_regs {
|
|||||||
#define DWC2_GUSBCFG_ULPI_INT_VBUS_INDICATOR_OFFSET 21
|
#define DWC2_GUSBCFG_ULPI_INT_VBUS_INDICATOR_OFFSET 21
|
||||||
#define DWC2_GUSBCFG_TERM_SEL_DL_PULSE (1 << 22)
|
#define DWC2_GUSBCFG_TERM_SEL_DL_PULSE (1 << 22)
|
||||||
#define DWC2_GUSBCFG_TERM_SEL_DL_PULSE_OFFSET 22
|
#define DWC2_GUSBCFG_TERM_SEL_DL_PULSE_OFFSET 22
|
||||||
|
#define DWC2_GUSBCFG_INDICATOR_PASSTHROUGH (1 << 24)
|
||||||
|
#define DWC2_GUSBCFG_INDICATOR_PASSTHROUGH_OFFSET 24
|
||||||
#define DWC2_GUSBCFG_IC_USB_CAP (1 << 26)
|
#define DWC2_GUSBCFG_IC_USB_CAP (1 << 26)
|
||||||
#define DWC2_GUSBCFG_IC_USB_CAP_OFFSET 26
|
#define DWC2_GUSBCFG_IC_USB_CAP_OFFSET 26
|
||||||
#define DWC2_GUSBCFG_IC_TRAFFIC_PULL_REMOVE (1 << 27)
|
#define DWC2_GUSBCFG_IC_TRAFFIC_PULL_REMOVE (1 << 27)
|
||||||
|
|||||||
Reference in New Issue
Block a user