3 # Copyright (C) 2016 Google, Inc
4 # Written by Simon Glass <sjg@chromium.org>
6 # SPDX-License-Identifier: GPL-2.0+
11 def fdt32_to_cpu(val):
12 """Convert a device tree cell to an integer
15 Value to convert (4-character string representing the cell value)
18 A native-endian integer value
20 return struct.unpack(">I", val)[0]