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