X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=include%2Ffdtdec.h;h=aa695df3173d843a9964fa53029685dbbfea63ac;hp=19bab7944817bfb382a0423126f2eaf9bcde8fe7;hb=006e73b9cafde9287912c4699091f3b1f07d3f97;hpb=4c89a369c7cd6e7ad3adec4601cfa69fec476164 diff --git a/include/fdtdec.h b/include/fdtdec.h index 19bab79448..aa695df317 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -530,4 +530,22 @@ const u8 *fdtdec_locate_byte_array(const void *blob, int node, */ int fdtdec_decode_region(const void *blob, int node, const char *prop_name, void **ptrp, size_t *size); + +/* A flash map entry, containing an offset and length */ +struct fmap_entry { + uint32_t offset; + uint32_t length; +}; + +/** + * Read a flash entry from the fdt + * + * @param blob FDT blob + * @param node Offset of node to read + * @param name Name of node being read + * @param entry Place to put offset and size of this node + * @return 0 if ok, -ve on error + */ +int fdtdec_read_fmap_entry(const void *blob, int node, const char *name, + struct fmap_entry *entry); #endif