From 103774b71cc0e510f890f639f9c3a65ad9d005c9 Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Thu, 12 Apr 2018 10:41:10 +0200 Subject: [PATCH 1/3] usb: dwc3-of-simple: Fix dependencies This simple glue layer does not require CONFIG_MISC, but it does require CONFIG_DM_USB. Signed-off-by: Jean-Jacques Hiblot --- drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 6caa615..6ea9621 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -23,7 +23,7 @@ config USB_XHCI_DWC3 config USB_XHCI_DWC3_OF_SIMPLE bool "DesignWare USB3 DRD Generic OF Simple Glue Layer" - select MISC + depends on DM_USB help Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core. From cc73ba97c008e96df5799dc37acbb04344fb3ac6 Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Thu, 12 Apr 2018 10:41:11 +0200 Subject: [PATCH 2/3] usb: dwc3-of-simple: Add support for DRA7/AM57 platforms. Add the compatibility with "ti,dwc3" and enable it by default if DM_USB is enabled. Signed-off-by: Jean-Jacques Hiblot --- drivers/usb/host/Kconfig | 1 + drivers/usb/host/dwc3-of-simple.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 6ea9621..3455e81 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -24,6 +24,7 @@ config USB_XHCI_DWC3 config USB_XHCI_DWC3_OF_SIMPLE bool "DesignWare USB3 DRD Generic OF Simple Glue Layer" depends on DM_USB + default y if DRA7XX help Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core. diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c index 54a5f60..abc3928 100644 --- a/drivers/usb/host/dwc3-of-simple.c +++ b/drivers/usb/host/dwc3-of-simple.c @@ -95,6 +95,7 @@ static int dwc3_of_simple_remove(struct udevice *dev) static const struct udevice_id dwc3_of_simple_ids[] = { { .compatible = "amlogic,meson-gxl-dwc3" }, + { .compatible = "ti,dwc3" }, { } }; From 38276090ee7fda6b31cac638d8c5f4fb61f57b0b Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Thu, 12 Apr 2018 10:13:50 +0200 Subject: [PATCH 3/3] usb: dwc3-of-simple: fix error check of clk_get_bulk when disabled The disabled clk API returns -ENOSYS unlike the reset API returning -ENOTSUPP. Fixes: ca7fdc8b1267 ("usb: host: Add simple of glue driver for DWC3 USB Controllers integration") Reported-by: Jean-Jacques Hiblot Signed-off-by: Neil Armstrong --- drivers/usb/host/dwc3-of-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c index abc3928..440dd10 100644 --- a/drivers/usb/host/dwc3-of-simple.c +++ b/drivers/usb/host/dwc3-of-simple.c @@ -50,7 +50,7 @@ static int dwc3_of_simple_clk_init(struct udevice *dev, int ret; ret = clk_get_bulk(dev, &simple->clks); - if (ret == -ENOTSUPP) + if (ret == -ENOSYS) return 0; if (ret) return ret;