diff options
author | John Crispin <john@openwrt.org> | 2013-06-24 12:39:28 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-06-24 12:39:28 +0000 |
commit | 5063f712a6d5d7e306566b4ad697967b5c06506c (patch) | |
tree | 7f1791869d2229136b565c339f9d519e549ef730 /target/linux/ramips/base-files/lib/preinit | |
parent | 111b480945afe53f0fe0fa877159e38461395327 (diff) | |
download | upstream-5063f712a6d5d7e306566b4ad697967b5c06506c.tar.gz upstream-5063f712a6d5d7e306566b4ad697967b5c06506c.tar.bz2 upstream-5063f712a6d5d7e306566b4ad697967b5c06506c.zip |
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>
SVN-Revision: 37027
Diffstat (limited to 'target/linux/ramips/base-files/lib/preinit')
-rw-r--r-- | target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips | 15 |
1 files changed, 4 insertions, 11 deletions
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 } |