summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-07 11:42:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-09 10:02:15 +0200
commit9b0907bd68ffc23ed27cc3c5f51ff505d64beb78 (patch)
treeb557f2fed11ab350287d7232bb4f0a4c58944084
parent72826e747442142a64b865ca6e4a8b3c88acd5d2 (diff)
downloadbarebox-9b0907bd68ffc23ed27cc3c5f51ff505d64beb78.tar.gz
barebox-9b0907bd68ffc23ed27cc3c5f51ff505d64beb78.tar.xz
Revert "ARM: Use armlinux_bootparams address for DTB"
This patch placed the flattened devicetree to armlinux_bootparams. armlinux_bootparams normally is at SDRAM_START + 0x100. The kernels initial page tables are normally at SDRAM_START + 0x4000, so the flattened devicetree gets overwritten once it exceeds 0x3f00 bytes which is quite common. Revert this patch for now once a better solution can be found This reverts commit 0c4108f9173ece75d96f19b447ef6464bdfdf187. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Alexander Shiyan <shc_work@mail.ru>
-rw-r--r--arch/arm/lib/armlinux.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index d962997d64..40a63ea7e1 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -261,24 +261,16 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
unsigned long initrd_size, void *oftree)
{
void (*kernel)(int zero, int arch, void *params) = adr;
+ void *params = NULL;
int architecture;
if (oftree) {
- if (armlinux_bootparams) {
- struct fdt_header *header = oftree;
-
- memcpy(armlinux_bootparams, oftree,
- fdt32_to_cpu(header->totalsize));
- } else {
- armlinux_bootparams = oftree;
- }
-
- printf("booting Linux kernel with devicetree at 0x%p\n",
- armlinux_bootparams);
+ printf("booting Linux kernel with devicetree\n");
+ params = oftree;
} else {
setup_tags(initrd_address, initrd_size, swap);
+ params = armlinux_bootparams;
}
-
architecture = armlinux_get_architecture();
shutdown_barebox();
@@ -296,10 +288,10 @@ void start_linux(void *adr, int swap, unsigned long initrd_address,
"mov r2, %1\n"
"bx %2\n"
:
- : "r" (architecture), "r" (armlinux_bootparams), "r" (kernel)
+ : "r" (architecture), "r" (params), "r" (kernel)
: "r0", "r1", "r2"
);
#else
- kernel(0, architecture, armlinux_bootparams);
+ kernel(0, architecture, params);
#endif
}