arm bootm: Allow to pass board specified atags
authorPali Rohár <pali.rohar@gmail.com>
Fri, 19 Oct 2012 02:00:04 +0000 (02:00 +0000)
committerTom Rini <trini@ti.com>
Tue, 30 Oct 2012 22:28:05 +0000 (15:28 -0700)
Board can implement function setup_board_tags which is used for adding atags

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
arch/arm/include/asm/setup.h
arch/arm/lib/bootm.c

index 89df4dc708f19d829b346dd61403316062b12e08..78a7facfc3a69527ec3a8d027d12b4a8e6dff9fb 100644 (file)
@@ -267,3 +267,8 @@ struct meminfo {
 extern struct meminfo meminfo;
 
 #endif
+
+/*
+ * Board specified tags
+ */
+void setup_board_tags(struct tag **in_params);
index 37476cc90d5cc6a9791bb146ec023a018bd901f3..1bd273085685ba9c4d424e7ac761a6b8bde5828d 100644 (file)
@@ -34,6 +34,7 @@
 #include <libfdt.h>
 #include <fdt_support.h>
 #include <asm/bootm.h>
+#include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -269,6 +270,8 @@ static int create_fdt(bootm_headers_t *images)
 }
 #endif
 
+__weak void setup_board_tags(struct tag **in_params) {}
+
 /* Subcommand: PREP */
 static void boot_prep_linux(bootm_headers_t *images)
 {
@@ -310,6 +313,7 @@ static void boot_prep_linux(bootm_headers_t *images)
                        setup_initrd_tag(gd->bd, images->rd_start,
                        images->rd_end);
 #endif
+               setup_board_tags(&params);
                setup_end_tag(gd->bd);
 #else /* all tags */
                printf("FDT and ATAGS support not compiled in - hanging\n");