Date: Wed, 17 May 2017 15:54:33 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318407 - head/sys/arm/mv Message-ID: <201705171554.v4HFsXEG001326@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Wed May 17 15:54:33 2017 New Revision: 318407 URL: https://svnweb.freebsd.org/changeset/base/318407 Log: Enable proper parsing of nested simlpe-buses on Marvell platforms OF_finddevice doesn't find the "simple-bus" node, which is problematic for Marvell platforms, using nested buses in Device Tree, like Armada 38x SoC. Submitted by: Arnaud Ysmal <arnaud.ysmal@stormshield.eu> Obtained from: Stormshield Sponsored by: Stormshield Reviewed by: loos Differential revision: https://reviews.freebsd.org/D10719 Modified: head/sys/arm/mv/mv_common.c Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Wed May 17 15:53:13 2017 (r318406) +++ head/sys/arm/mv/mv_common.c Wed May 17 15:54:33 2017 (r318407) @@ -2280,11 +2280,12 @@ moveon: static int fdt_win_setup(void) { - phandle_t node, child; + phandle_t node, child, sb; struct soc_node_spec *soc_node; u_long size, base; int err, i; + sb = 0; node = OF_finddevice("/"); if (node == -1) panic("fdt_win_setup: no root node"); @@ -2326,7 +2327,7 @@ fdt_win_setup(void) */ child = OF_peer(child); if ((child == 0) && (node == OF_finddevice("/"))) { - node = fdt_find_compatible(node, "simple-bus", 0); + sb = node = fdt_find_compatible(node, "simple-bus", 0); if (node == 0) return (ENXIO); child = OF_child(node); @@ -2336,7 +2337,7 @@ fdt_win_setup(void) * it is present) and its children. This node also have * "simple-bus" compatible. */ - if ((child == 0) && (node == OF_finddevice("simple-bus"))) { + if ((child == 0) && (node == sb)) { node = fdt_find_compatible(node, "simple-bus", 0); if (node == 0) return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705171554.v4HFsXEG001326>