ramips: move ESW reset to preinit on RT305x/RT5350
[openwrt.git] / target / linux / ramips / base-files / lib / preinit / 07_set_preinit_iface_ramips
index edc5a12..db03b6b 100644 (file)
@@ -6,17 +6,10 @@
 . /lib/ramips.sh
 
 ramips_set_preinit_iface() {
 . /lib/ramips.sh
 
 ramips_set_preinit_iface() {
-       local board=$(ramips_board_name)
-
-       case "$board" in
-       mpr-a2)
-               #TODO
-               # Ralink ethernet driver cannot re-open ethernet if it is opened during preinit and then closed.
-               # Looks like Ralink ethernet driver has a problem.
-               # Temporary solution is not to open ethernet during preinit.
-               return 0
-               ;;
-       esac
+       RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
+       if [ -n "${RT3X5X}" ]; then
+               swconfig dev rt305x set reset 1
+       fi
 
        ifname=eth0
 }
 
        ifname=eth0
 }