[OpenWrt-Devel] [PATCH 0/4] Gemini forward-port to kernel v4.14

Hans Ulli Kroll ulli.kroll at googlemail.com
Sat Apr 14 13:36:53 EDT 2018


Hi Roman

On Tue, 10 Apr 2018, Linus Walleij wrote:

> On Mon, Apr 9, 2018 at 12:38 PM, Roman Yeryomin <roman at advem.lv> wrote:
> 
> > I have tested them quickly yesterday on nas4220b board. Although I've
> > managed to boot it (had to fix rootfs image) ethernet and usb didn't work.
> > And I didn't check anything else.
> > I didn't yet look at the code but before I dive there I have a question: did
> > you have a chance to test it yourself on any of the boards? And if yes,
> > which one?
> 

I think the fotg controller gets stalled after a port reset.
Please check attached (untested) patch for openwrt.
I can test this next week by myself

From 10be6c15addac0bdb9c2d196d450aee1fcb2070b Mon Sep 17 00:00:00 2001
From: Hans Ulli Kroll <ulli.kroll at googlemail.com>
Date: Sat, 14 Apr 2018 19:13:11 +0200
Subject: [PATCH] gemini: fix fotg2 stall after port reset

Signed-off-by: Hans Ulli Kroll <ulli.kroll at googlemail.com>
---
 ...b-host-fotg2-restart-hcd-after-port-reset.patch | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 target/linux/gemini/patches-4.14/0032-usb-host-fotg2-restart-hcd-after-port-reset.patch

diff --git a/target/linux/gemini/patches-4.14/0032-usb-host-fotg2-restart-hcd-after-port-reset.patch b/target/linux/gemini/patches-4.14/0032-usb-host-fotg2-restart-hcd-after-port-reset.patch
new file mode 100644
index 0000000000..3f1de0d107
--- /dev/null
+++ b/target/linux/gemini/patches-4.14/0032-usb-host-fotg2-restart-hcd-after-port-reset.patch
@@ -0,0 +1,31 @@
+From 731a2896e11b4e6a8d252e6c14edb1b09dbfcd46 Mon Sep 17 00:00:00 2001
+From: Hans Ulli Kroll <ulli.kroll at googlemail.com>
+Date: Sat, 14 Apr 2018 18:49:57 +0200
+Subject: [PATCH 1/2] usb: host: fotg2: restart hcd after port reset
+
+on Gemini SoC FOTG2 stalls after port reset
+rerstart the hcd.
+
+Signed-off-by: Hans Ulli Kroll <ulli.kroll at googlemail.com>
+---
+ drivers/usb/host/fotg210-hcd.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
+index 2acc51b0be5a..bc9efb49adc7 100644
+--- a/drivers/usb/host/fotg210-hcd.c
++++ b/drivers/usb/host/fotg210-hcd.c
+@@ -1653,6 +1653,10 @@ static int fotg210_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
+ 			/* see what we found out */
+ 			temp = check_reset_complete(fotg210, wIndex, status_reg,
+ 					fotg210_readl(fotg210, status_reg));
++
++			/* restart schedule */
++			fotg210->command |= CMD_RUN;
++			fotg210_writel(fotg210, fotg210->command, &fotg210->regs->command);
+ 		}
+ 
+ 		if (!(temp & (PORT_RESUME|PORT_RESET))) {
+-- 
+2.16.2
+
-- 
2.16.2

I have some other patch here which disable the resume after 
usb_hcd_resume_root_hub()
But this make no sence to me.

Greetings
Hans Ulli Kroll
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list