diff options
author | Simon Glass <sjg@chromium.org> | 2011-08-22 08:15:25 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-09-19 13:45:37 -0700 |
commit | 4fa99eb575d56552ae9a1252f56e0475e3848d53 (patch) | |
tree | 3a1cf082c7de319eb2383583d958cbf2ca4aac2d /include | |
parent | 2c49ec7f1be4ec51c39747805897f78626134470 (diff) |
fdt: Move Chrome OS memory areas to fdt
This moves the last remaining hard-coded CONFIG to the fdt.
BUG=chromium-os:17062
TEST=build for Seaboard
Change-Id: Ic152ce12a0f87211e4cc98eef15601f0703137b1
Reviewed-on: http://gerrit.chromium.org/gerrit/7642
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/chromeos/fdt_decode.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/chromeos/fdt_decode.h b/include/chromeos/fdt_decode.h index dcb98cbbf1..96def9a1e9 100644 --- a/include/chromeos/fdt_decode.h +++ b/include/chromeos/fdt_decode.h @@ -26,4 +26,21 @@ int fdt_decode_twostop_fmap(const void *fdt, struct twostop_fmap *config); */ int fdt_decode_chromeos_config_has_prop(const void *fdt, const char *name); +/** + * Look up a property in chromeos-config which contains a memory region + * address and size. Then return a pointer to this address. if the address + * is zero, it is allocated with malloc() instead. + * + * The property must hold one address with a length. This is only tested on + * 32-bit machines. + * + * @param blob FDT blob + * @param node node to examine + * @param prop_name name of property to find + * @param size returns size of region + * @return pointer to region, or NULL if property not found/malloc failed + */ +void *fdt_decode_chromeos_alloc_region(const void *blob, + const char *prop_name, size_t *size); + #endif /* CHROMEOS_FDT_DECODE_H_ */ |