1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2017 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
10 #include <dm/ofnode.h>
12 enum fmap_compress_t {
23 /* A flash map entry, containing an offset and length */
27 uint32_t used; /* Number of bytes used in region */
28 enum fmap_compress_t compress_algo; /* Compression type */
29 enum fmap_hash_t hash_algo; /* Hash algorithm */
30 const uint8_t *hash; /* Hash value */
31 int hash_size; /* Hash size */
35 * Read a flash entry from the fdt
37 * @param node Reference to node to read
38 * @param name Name of node being read
39 * @param entry Place to put offset and size of this node
40 * @return 0 if ok, -ve on error
42 int of_read_fmap_entry(ofnode node, const char *name,
43 struct fmap_entry *entry);