From mboxrd@z Thu Jan 1 00:00:00 1970 From: sjg at google.com Date: Tue, 2 May 2017 13:12:47 +0200 Subject: [U-Boot] [PATCH 2/2] dtoc: Handle nodes with phandles that depend on the same In-Reply-To: <1c942884-debf-a37a-49b8-50751f55d907@rock-chips.com> References: <20170423004222.5720-1-sjg@chromium.org> <20170423004222.5720-2-sjg@chromium.org> <1c942884-debf-a37a-49b8-50751f55d907@rock-chips.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 04/23/2017 08:42 AM, Simon Glass wrote: > At present dtoc assumes that nodes which are phandles do not themselves > reference other phandle nodes. Unfortunately this is not necessarilly > true. As a result we can currently output C code which does not compile > because a node declaration can be referenced before it is declared. > > Adjust the code to explicitly output all phandle nodes needed by node > before the node itself is output. > > This fixes building with the latest rk3399-firefly.dts from Linux, which > has reordered the nodes. > > Signed-off-by: Simon Glass > --- > > tools/dtoc/dtoc.py | 55 ++++++++++++++++++++++++++++++++++++++++-------------- > 1 file changed, 41 insertions(+), 14 deletions(-) > Applied to u-boot-rockchip/next, thanks!