diff options
author | Jeremy Kerr <jeremy.kerr@canonical.com> | 2010-01-30 03:31:21 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-02-09 10:34:10 -0500 |
commit | 1406bc2f57787797d1f6a3675c019a7093769275 (patch) | |
tree | 2b3bee50a75fa1502ef00eccf7bcecda19acd56a /include | |
parent | 50ab2fe147e22c8786552cda1791a61ae81b84d2 (diff) |
of/flattree: use callback to setup initrd from /chosen
At present, the fdt code sets the kernel-wide initrd_start and
initrd_end variables when parsing /chosen. On ARM, we only set these
once the bootmem has been reserved.
This change adds an arch hook to setup the initrd from the device
tree:
void early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end);
The arch-specific code can then setup the initrd however it likes.
Compiled on powerpc, with CONFIG_BLK_DEV_INITRD=y and =n.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of_fdt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index bf26bd5df9f1..f32f0fc5314a 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -80,6 +80,16 @@ extern int early_init_dt_scan_memory(unsigned long node, const char *uname, | |||
80 | extern void early_init_dt_add_memory_arch(u64 base, u64 size); | 80 | extern void early_init_dt_add_memory_arch(u64 base, u64 size); |
81 | extern u64 dt_mem_next_cell(int s, u32 **cellp); | 81 | extern u64 dt_mem_next_cell(int s, u32 **cellp); |
82 | 82 | ||
83 | /* | ||
84 | * If BLK_DEV_INITRD, the fdt early init code will call this function, | ||
85 | * to be provided by the arch code. start and end are specified as | ||
86 | * physical addresses. | ||
87 | */ | ||
88 | #ifdef CONFIG_BLK_DEV_INITRD | ||
89 | extern void early_init_dt_setup_initrd_arch(unsigned long start, | ||
90 | unsigned long end); | ||
91 | #endif | ||
92 | |||
83 | /* Early flat tree scan hooks */ | 93 | /* Early flat tree scan hooks */ |
84 | extern int early_init_dt_scan_root(unsigned long node, const char *uname, | 94 | extern int early_init_dt_scan_root(unsigned long node, const char *uname, |
85 | int depth, void *data); | 95 | int depth, void *data); |