diff options
author | Albert ARIBAUD | 2014-03-25 10:25:14 +0100 |
---|---|---|
committer | Albert ARIBAUD | 2014-03-25 10:53:15 +0100 |
commit | ab6423cae0323e8db2c8fdd0a99138d93fde2137 (patch) | |
tree | a97493753a119e577161a4fb0b40b8edfc3923bb /lib | |
parent | 63f347ec4ca94e3b57c6c719e4acaec81b61dc7a (diff) | |
parent | 2c072c958bb544c72f0e848375803dbd6971f022 (diff) |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Trivial merge conflict, needed to manually remove
local_info as per commit 41364f0f.
Conflicts:
board/samsung/common/board.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fdtdec.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index be045989026..33265ecfb26 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -63,6 +63,8 @@ static const char * const compat_names[COMPAT_COUNT] = { COMPAT(INFINEON_SLB9635_TPM, "infineon,slb9635-tpm"), COMPAT(INFINEON_SLB9645_TPM, "infineon,slb9645-tpm"), COMPAT(SAMSUNG_EXYNOS5_I2C, "samsung,exynos5-hsi2c"), + COMPAT(SANDBOX_HOST_EMULATION, "sandbox,host-emulation"), + COMPAT(SANDBOX_LCD_SDL, "sandbox,lcd-sdl"), }; const char *fdtdec_get_compatible(enum fdt_compat_id id) @@ -619,3 +621,27 @@ int fdtdec_decode_region(const void *blob, int node, debug("%s: size=%zx\n", __func__, *size); return 0; } + +/** + * 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) +{ + u32 reg[2]; + + if (fdtdec_get_int_array(blob, node, "reg", reg, 2)) { + debug("Node '%s' has bad/missing 'reg' property\n", name); + return -FDT_ERR_NOTFOUND; + } + entry->offset = reg[0]; + entry->length = reg[1]; + + return 0; +} |