summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-24 12:39:28 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-24 12:39:28 +0000
commit4bedb1ac08477917ee4a157be9d35023fb05a238 (patch)
treeaa7a73304aeba77e8d44e57ee4d4378c97145cf5 /target/linux/ramips/base-files
parent4f6a8df9b3f2f02c3cdcc0719d9e6ef7280eac51 (diff)
ramips: move ESW reset to preinit on RT305x/RT5350
RT305x/RT5350 SoCs require the switch to be reset before touching the ethernet interface, otherwise the driver will panic. As we already init the ethernet in preinit we therefor need to reset the switch before that. Signed-off-by: Felix Kaechele <felix@fetzig.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37027 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/02_network1
-rw-r--r--target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips15
2 files changed, 4 insertions, 12 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index b45b0ca25a..747a83d454 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -13,7 +13,6 @@ ramips_setup_rt3x5x_vlans()
fi
local wanports=""
local lanports=""
- swconfig dev rt305x set reset 1
for port in 5 4 3 2 1 0; do
if [ `swconfig dev rt305x port $port get disable` = "1" ]; then
continue
diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
index edc5a12e34..db03b6bde6 100644
--- a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
+++ b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
@@ -6,17 +6,10 @@
. /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
}