ARM: 8496/1: OMAP: RX51: save ATAGS data in the early boot stage
authorIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Fri, 1 Jan 2016 11:49:36 +0000 (12:49 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 4 Jan 2016 11:26:00 +0000 (11:26 +0000)
This fixes a regression with device tree based booting compared to legacy booting for n900 to make the n900 legacy user space to also work with device tree based booting

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-omap2/board-generic.c

index 04a56cc04dfa48cfc8c9752033cff152e5f15dba..809827265fb39d1b8a7178481bb91e87951c4a14 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/of_platform.h>
 #include <linux/irqdomain.h>
 
+#include <asm/setup.h>
 #include <asm/mach/arch.h>
 
 #include "common.h"
@@ -76,8 +77,17 @@ static const char *const n900_boards_compat[] __initconst = {
        NULL,
 };
 
+/* Legacy userspace on Nokia N900 needs ATAGS exported in /proc/atags,
+ * save them while the data is still not overwritten
+ */
+static void __init rx51_reserve(void)
+{
+       save_atags((const struct tag *)(PAGE_OFFSET + 0x100));
+       omap_reserve();
+}
+
 DT_MACHINE_START(OMAP3_N900_DT, "Nokia RX-51 board")
-       .reserve        = omap_reserve,
+       .reserve        = rx51_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap3430_init_early,
        .init_machine   = omap_generic_init,
This page took 0.02572 seconds and 5 git commands to generate.