Simon Glass | ba48258 | 2016-07-25 18:59:02 -0600 | [diff] [blame] | 1 | #!/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 Glass | 7b75b44 | 2017-05-27 07:38:28 -0600 | [diff] [blame^] | 9 | # Bring in the normal fdt library (which relies on libfdt) |
| 10 | import fdt |
Simon Glass | ba48258 | 2016-07-25 18:59:02 -0600 | [diff] [blame] | 11 | |
Simon Glass | 160a766 | 2017-05-27 07:38:26 -0600 | [diff] [blame] | 12 | def FdtScan(fname): |
Simon Glass | ba48258 | 2016-07-25 18:59:02 -0600 | [diff] [blame] | 13 | """Returns a new Fdt object from the implementation we are using""" |
Simon Glass | 7b75b44 | 2017-05-27 07:38:28 -0600 | [diff] [blame^] | 14 | dtb = fdt.Fdt(fname) |
Simon Glass | ba48258 | 2016-07-25 18:59:02 -0600 | [diff] [blame] | 15 | dtb.Scan() |
| 16 | return dtb |