[OpenWrt-Devel] AsiaRF AWM002 (ramips) USB and reboot broken at r44044

Mingyu Li igvtee at gmail.com
Tue Feb 3 01:48:49 EST 2015


Dear Sir.

the fe_reset only used to reset ethernet and switch driver.
i think your problem is the old code is wrong.
at ethernet driver(soc_rt305x.c) it just clean all reset bit (enable all
functions. usb?).
but the new code only reset and enable ethernet and switch block.
you can see the diff as below.

 static void rt5350_fe_reset(void)
 {
-       rt_sysc_w32(RT305X_RESET_FE | RT305X_RESET_ESW,
SYSC_REG_RESET_CTRL);
-       rt_sysc_w32(0, SYSC_REG_RESET_CTRL);
+       fe_reset(RT305X_RESET_FE | RT305X_RESET_ESW);
 }

+void fe_reset(u32 reset_bits)
+{
+       u32 t;
+
+       t = rt_sysc_r32(SYSC_REG_RSTCTRL);
+       t |= reset_bits;
+       rt_sysc_w32(t , SYSC_REG_RSTCTRL);
+       udelay(10);
+
+       t &= ~reset_bits;
+       rt_sysc_w32(t, SYSC_REG_RSTCTRL);
+       udelay(10);
+}

Best Regards.

2015-02-03 13:44 GMT+08:00 Russell Senior <russell at personaltelco.net>:

> >>>>> "Russell" == Russell Senior <russell at personaltelco.net> writes:
>
> Russell> I just wanted to give a heads up that I built trunk r44245 last
> Russell> night and discovered two problems: reboot no longer works, and
> Russell> USB fails to enumerate a usb-serial device that worked
> Russell> previously (specifically a pl2303).  To successfully reset, a
> Russell> power cycle is required.  These problems were not evident the
> Russell> last time I built, about 3 weeks ago, r43960.  The lsmod output
> Russell> is nearly identical between working/not-working (with some
> Russell> minor fuzz in a few module sizes).
>
> Russell> I'm planning to try bisecting this, but if someone knows the
> Russell> problem and beats me to it, I'd be grateful.  Bisecting is
> Russell> powerful but somewhat tedious. ;-)
>
> I bisected the problem.  It appears the bad commit is r44044 (r44043 is
> good).  The reset and usb problems appear at the same commit.
>
> commit fb038c46afa40edbd37eb9a93468312b287c5aa7
> Author: nbd <nbd at 3c298f89-4303-0410-b956-a3cf2f4a3e73>
> Date:   Sun Jan 18 20:17:07 2015 +0000
>
>     ralink: use fe_reset to control all reset
>
>     Signed-off-by: michael lee <igvtee at gmail.com>
>
>     git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44044
>     3c298f89-4303-0410-b956-a3cf2f4a3e73
>
>
>
> --
> Russell Senior, President
> russell at personaltelco.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150203/2920df43/attachment.htm>
-------------- next part --------------
_______________________________________________
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