rt5350 switch support fix
authorJohn Crispin <john@openwrt.org>
Wed, 2 Jan 2013 11:28:21 +0000 (11:28 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 2 Jan 2013 11:28:21 +0000 (11:28 +0000)
RT5350 frame engine need reset frame engine and embedded switch together.

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
SVN-Revision: 34969

target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c

index 557eb10c18d520ebc8726467dfcfc7f896647b61..42429b791e91eb9d58724f0fd8cde645171ec8cb 100644 (file)
@@ -116,7 +116,11 @@ void __init rt305x_register_flash(unsigned int id)
 
 static void rt305x_fe_reset(void)
 {
-       rt305x_sysc_wr(RT305X_RESET_FE, SYSC_REG_RESET_CTRL);
+       u32 reset_bits = RT305X_RESET_FE;
+
+       if (soc_is_rt5350())
+               reset_bits |= RT305X_RESET_ESW;
+       rt305x_sysc_wr(reset_bits, SYSC_REG_RESET_CTRL);
        rt305x_sysc_wr(0, SYSC_REG_RESET_CTRL);
 }