blob: d6337ea22773ad18606af5e547312df53d405a36 [file] [log] [blame]
Simon Glassba482582016-07-25 18:59:02 -06001#!/usr/bin/python
2#
3# Copyright (C) 2016 Google, Inc
4# Written by Simon Glass <sjg@chromium.org>
5#
6# SPDX-License-Identifier: GPL-2.0+
7#
8
Simon Glass7b75b442017-05-27 07:38:28 -06009# Bring in the normal fdt library (which relies on libfdt)
10import fdt
Simon Glassba482582016-07-25 18:59:02 -060011
Simon Glass160a7662017-05-27 07:38:26 -060012def FdtScan(fname):
Simon Glassba482582016-07-25 18:59:02 -060013 """Returns a new Fdt object from the implementation we are using"""
Simon Glass7b75b442017-05-27 07:38:28 -060014 dtb = fdt.Fdt(fname)
Simon Glassba482582016-07-25 18:59:02 -060015 dtb.Scan()
16 return dtb