adm8668: remove linux 3.3 support
[openwrt/staging/yousong.git] / target / linux / octeon / patches-3.10 / 0009-MIPS-cavium-octeon-fix-early-boot-hang-on-EBH5600-bo.patch
1 From b2e4f1560f7388f8157dd2c828211abbfad0e806 Mon Sep 17 00:00:00 2001
2 From: Aaro Koskinen <aaro.koskinen@nsn.com>
3 Date: Fri, 1 Nov 2013 17:06:04 +0200
4 Subject: [PATCH] MIPS: cavium-octeon: fix early boot hang on EBH5600 board
5
6 The boot hangs early on EBH5600 board when octeon_fdt_pip_iface() is
7 trying enumerate a non-existant interface. The actual hang happens in
8 cvmx_helper_interface_get_mode():
9
10 mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
11
12 when interface == 4. We can avoid this situation by first checking that
13 the interface exists in the DTB.
14
15 Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
16 Acked-by: David Daney <david.daney@cavium.com>
17 Signed-off-by: John Crispin <blogic@openwrt.org>
18 Patchwork: http://patchwork.linux-mips.org/patch/6101/
19 ---
20 arch/mips/cavium-octeon/octeon-platform.c | 6 +++---
21 1 file changed, 3 insertions(+), 3 deletions(-)
22
23 --- a/arch/mips/cavium-octeon/octeon-platform.c
24 +++ b/arch/mips/cavium-octeon/octeon-platform.c
25 @@ -336,14 +336,14 @@ static void __init octeon_fdt_pip_iface(
26 int p;
27 int count = 0;
28
29 - if (cvmx_helper_interface_enumerate(idx) == 0)
30 - count = cvmx_helper_ports_on_interface(idx);
31 -
32 snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx);
33 iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer);
34 if (iface < 0)
35 return;
36
37 + if (cvmx_helper_interface_enumerate(idx) == 0)
38 + count = cvmx_helper_ports_on_interface(idx);
39 +
40 for (p = 0; p < 16; p++)
41 octeon_fdt_pip_port(iface, idx, p, count - 1, pmac);
42 }