alistair23-linux/drivers/usb/dwc2
Bruno Meirelles Herrera d970749007 usb: dwc2: Fix call location of dwc2_check_core_endianness
Some SoC/IP as STM32F469, the snpsid can only be read after clock is
enabled, otherwise it will read as 0, and the dwc2_check_core_endianness
will assume the core and AHB have opposite endianness, leading to the
following error:

[    1.976339] dwc2 50000000.usb: 50000000.usb supply vusb_d not found, using dummy regulator
[    1.986124] dwc2 50000000.usb: Linked as a consumer to regulator.0
[    1.992711] dwc2 50000000.usb: 50000000.usb supply vusb_a not found, using dummy regulator
[    2.003672] dwc2 50000000.usb: dwc2_core_reset: HANG! AHB Idle timeout GRSTCTL GRSTCTL_AHBIDLE
[    2.015176] dwc2: probe of 50000000.usb failed with error -16

The proposed patch changes the location where dwc2_check_core_endianness
is called, allowing the clock peripheral to be enabled first.

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Bruno Meirelles Herrera <bmh@certi.org.br>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-09-05 13:12:31 +03:00
..
core.c usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
core.h usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic. 2018-07-30 10:39:18 +03:00
core_intr.c usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
debug.h usb: dwc2: Fix kernel doc's warnings. 2018-05-21 10:02:13 +03:00
debugfs.c usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
gadget.c usb: changes for v4.19 2018-07-30 10:21:14 +02:00
hcd.c usb: changes for v4.19 2018-07-30 10:21:14 +02:00
hcd.h usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
hcd_ddma.c usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
hcd_intr.c usb: changes for v4.19 2018-07-30 10:21:14 +02:00
hcd_queue.c usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
hw.h usb: dwc2: Add Interpacket Gap(IPG) feature support 2018-05-15 10:16:47 +03:00
Kconfig usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
params.c usb: dwc2: Turn on uframe_sched on "stm32f4x9_fsotg" platforms 2018-07-30 10:39:19 +03:00
pci.c usb: dwc2: pci: Fix error return code in dwc2_pci_probe() 2018-05-21 10:36:14 +03:00
platform.c usb: dwc2: Fix call location of dwc2_check_core_endianness 2018-09-05 13:12:31 +03:00