ralink: fix USB host function for Intenso M2M

The ubootloader of the M2M sets the reset bits for
both USB device and USB host during initialization
(to save a few mA of power during boot).

However, for the usb<->sata bridge to be properly
detected, it is necessary to clear both reset bits
as otherwise the kernel logs will just be filled
with:

usb 1-1: device descriptor read/64, error -145
...

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>

SVN-Revision: 44248
owl
John Crispin 2015-02-03 10:11:11 +00:00
parent 4a1d29c5fc
commit df22a8e3d0
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+obj-$(CONFIG_RALINK_USBPHY) += ralink-phy.o +obj-$(CONFIG_RALINK_USBPHY) += ralink-phy.o
--- /dev/null --- /dev/null
+++ b/drivers/usb/phy/ralink-phy.c +++ b/drivers/usb/phy/ralink-phy.c
@@ -0,0 +1,191 @@ @@ -0,0 +1,193 @@
+/* +/*
+ * Copyright (C) 2013 John Crispin <blogic@openwrt.org> + * Copyright (C) 2013 John Crispin <blogic@openwrt.org>
+ * + *
@ -103,6 +103,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ rt_sysc_m32(0, RT_SYSCFG1_USB0_HOST_MODE, RT_SYSC_REG_SYSCFG1); + rt_sysc_m32(0, RT_SYSCFG1_USB0_HOST_MODE, RT_SYSC_REG_SYSCFG1);
+ if (!IS_ERR(rsthost)) + if (!IS_ERR(rsthost))
+ reset_control_deassert(rsthost); + reset_control_deassert(rsthost);
+ if (!IS_ERR(rstdev))
+ reset_control_deassert(rstdev);
+ } else { + } else {
+ rt_sysc_m32(RT_SYSCFG1_USB0_HOST_MODE, 0, RT_SYSC_REG_SYSCFG1); + rt_sysc_m32(RT_SYSCFG1_USB0_HOST_MODE, 0, RT_SYSC_REG_SYSCFG1);
+ if (!IS_ERR(rstdev)) + if (!IS_ERR(rstdev))