diff mbox

[U-Boot,v4,1/5] arm bootm: Allow to pass board specified atags

Message ID 1350648008-25514-2-git-send-email-pali.rohar@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Pali Rohár Oct. 19, 2012, noon UTC
Board can implement function setup_board_tags which is used for adding atags

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
Changes in v4:
   - Added commit message
   - Use __weak instead gcc attribute

 arch/arm/include/asm/setup.h |    5 +++++
 arch/arm/lib/bootm.c         |    4 ++++
 2 files changed, 9 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 89df4dc..78a7fac 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -267,3 +267,8 @@  struct meminfo {
 extern struct meminfo meminfo;
 
 #endif
+
+/*
+ * Board specified tags
+ */
+void setup_board_tags(struct tag **in_params);
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a9070d5..9323db0 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -34,6 +34,7 @@ 
 #include <libfdt.h>
 #include <fdt_support.h>
 #include <asm/bootm.h>
+#include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -266,6 +267,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)
 {
@@ -307,6 +310,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");