mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
Merge branch 'master' of git://source.denx.de/u-boot-usb
- DWC3 for exynos7870 - Avoid a noisy message on xhci controllers
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <dm.h>
|
||||
#include <reset.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <dm/device_compat.h>
|
||||
#include <dm/lists.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
@@ -173,8 +174,8 @@ static int dwc3_generic_of_to_plat(struct udevice *dev)
|
||||
node = dev_ofnode(dev->parent);
|
||||
plat->dr_mode = usb_get_dr_mode(node);
|
||||
if (plat->dr_mode == USB_DR_MODE_UNKNOWN) {
|
||||
pr_err("Invalid usb mode setup\n");
|
||||
return -ENODEV;
|
||||
dev_info(dev, "No USB mode specified. Using 'otg'\n");
|
||||
plat->dr_mode = USB_DR_MODE_OTG;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -516,6 +517,10 @@ static int dwc3_glue_bind_common(struct udevice *parent, ofnode node)
|
||||
if (!dr_mode)
|
||||
dr_mode = usb_get_dr_mode(node);
|
||||
|
||||
/* usb mode must fallback to peripheral if not known */
|
||||
if (dr_mode == USB_DR_MODE_UNKNOWN)
|
||||
dr_mode = USB_DR_MODE_OTG;
|
||||
|
||||
if (CONFIG_IS_ENABLED(DM_USB_GADGET) &&
|
||||
(dr_mode == USB_DR_MODE_PERIPHERAL || dr_mode == USB_DR_MODE_OTG)) {
|
||||
debug("%s: dr_mode: OTG or Peripheral\n", __func__);
|
||||
@@ -706,6 +711,7 @@ static const struct udevice_id dwc3_glue_ids[] = {
|
||||
{ .compatible = "fsl,imx8mp-dwc3", .data = (ulong)&imx8mp_ops },
|
||||
{ .compatible = "fsl,imx8mq-dwc3" },
|
||||
{ .compatible = "intel,tangier-dwc3" },
|
||||
{ .compatible = "samsung,exynos7870-dwusb3" },
|
||||
{ .compatible = "samsung,exynos850-dwusb3" },
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -158,7 +158,7 @@ static int xhci_start(struct xhci_hcor *hcor)
|
||||
u32 temp;
|
||||
int ret;
|
||||
|
||||
puts("Starting the controller\n");
|
||||
debug("Starting the controller\n");
|
||||
temp = xhci_readl(&hcor->or_usbcmd);
|
||||
temp |= (CMD_RUN);
|
||||
xhci_writel(&hcor->or_usbcmd, temp);
|
||||
|
||||
@@ -58,7 +58,7 @@ def test_usb_start(ubman):
|
||||
assert 'USB init failed' not in output
|
||||
assert 'starting USB...' in output
|
||||
|
||||
if 'Starting the controller' in output:
|
||||
if ubman.config.buildconfig.get('config_usb_xhci_hcd'):
|
||||
assert 'USB XHCI' in output
|
||||
|
||||
output = ubman.run_command('echo $?')
|
||||
@@ -104,7 +104,7 @@ def test_usb_reset(ubman):
|
||||
assert 'USB init failed' not in output
|
||||
assert 'resetting USB...' in output
|
||||
|
||||
if 'Starting the controller' in output:
|
||||
if ubman.config.buildconfig.get('config_usb_xhci_hcd'):
|
||||
assert 'USB XHCI' in output
|
||||
|
||||
output = ubman.run_command('echo $?')
|
||||
|
||||
Reference in New Issue
Block a user