aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-04-28 16:27:20 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-05-11 09:14:29 -0400
commit9eb8f6743b076b67f00776cda4330c802e157b41 (patch)
tree665b7bc96e672e4f3df6c25ea08b00714331a0c4 /arch/arm/mm
parent4c2896e88d976d0e5b2213c64cde885f5677fa2b (diff)
arm/dt: Allow CONFIG_OF on ARM
Add some basic empty infrastructure for DT support on ARM. v5: - Fix off-by-one error in size calculation of initrd - Stop mucking with cmd_line, and load command line from dt into boot_command_line instead which matches the behaviour of ATAGS booting v3: - moved cmd_line export and initrd setup to this patch to make the series bisectable. - switched to alloc_bootmem_align() for allocation when unflattening the device tree. memblock_alloc() was not the right interface. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index e5f6fc428348..26c405421f4e 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -15,6 +15,7 @@
15#include <linux/mman.h> 15#include <linux/mman.h>
16#include <linux/nodemask.h> 16#include <linux/nodemask.h>
17#include <linux/initrd.h> 17#include <linux/initrd.h>
18#include <linux/of_fdt.h>
18#include <linux/highmem.h> 19#include <linux/highmem.h>
19#include <linux/gfp.h> 20#include <linux/gfp.h>
20#include <linux/memblock.h> 21#include <linux/memblock.h>
@@ -71,6 +72,14 @@ static int __init parse_tag_initrd2(const struct tag *tag)
71 72
72__tagtable(ATAG_INITRD2, parse_tag_initrd2); 73__tagtable(ATAG_INITRD2, parse_tag_initrd2);
73 74
75#ifdef CONFIG_OF_FLATTREE
76void __init early_init_dt_setup_initrd_arch(unsigned long start, unsigned long end)
77{
78 phys_initrd_start = start;
79 phys_initrd_size = end - start;
80}
81#endif /* CONFIG_OF_FLATTREE */
82
74/* 83/*
75 * This keeps memory configuration data used by a couple memory 84 * This keeps memory configuration data used by a couple memory
76 * initialization functions, as well as show_mem() for the skipping 85 * initialization functions, as well as show_mem() for the skipping