diff options
author | Tom Wai-Hong Tam <waihong@chromium.org> | 2011-07-15 09:55:28 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:05 -0700 |
commit | 1f824792fd983636f5626f4b24b9aa1e5485fe3a (patch) | |
tree | 80c0c5fa9cc0f429c58485262669d079dd2c175c /include/fdt_decode.h | |
parent | b60d4cfd5eb060d688e62d86fa9cf4271bf0873c (diff) |
fdt: Decode memory section from fdt.
BUG=chromium-os:17950
TEST=build without error, pending test until we use it to clear the ram regions.
Change-Id: Icf7695e7ca512541dc77cd84397818e6392f2e9a
Reviewed-on: http://gerrit.chromium.org/gerrit/4479
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'include/fdt_decode.h')
-rw-r--r-- | include/fdt_decode.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/fdt_decode.h b/include/fdt_decode.h index 45072df9bc..84c2ffb1bf 100644 --- a/include/fdt_decode.h +++ b/include/fdt_decode.h @@ -42,6 +42,12 @@ typedef u32 addr_t; #define addr_to_cpu(reg) be32_to_cpu(reg) #endif +/* Information obtained about memory from the FDT */ +struct fdt_memory { + addr_t start; + addr_t end; +}; + /** * Compat types that we know about and for which we might have drivers. * Each is named COMPAT_<dir>_<filename> where <dir> is the directory @@ -200,6 +206,14 @@ struct fdt_i2c { }; /** + * Returns information from the FDT about the memory. + * + * @param blob FDT blob to use + * @param config structure to use to return information + */ +int fdt_decode_memory(const void *blob, struct fdt_memory *config); + +/** * Return information from the FDT about the console UART. This looks for * an alias node called 'console' which must point to a UART. It then reads * out the following attributes: |