[U-Boot] [PATCH 16/17] bootm command: added argument to arch_preboot_os, function may depend on OS type.

Daniel Hellstrom daniel at gaisler.com
Thu Jan 28 13:16:35 CET 2010


Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
 common/cmd_bootm.c     |    8 ++++----
 cpu/mpc85xx/cpu_init.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 94ddac3..f795857 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -170,11 +170,11 @@ void __arch_lmb_reserve(struct lmb *lmb)
 void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__arch_lmb_reserve")));
 
 /* Allow for arch specific config before we boot */
-void __arch_preboot_os(void)
+void __arch_preboot_os(int os)
 {
 	/* please define platform specific arch_preboot_os() */
 }
-void arch_preboot_os(void) __attribute__((weak, alias("__arch_preboot_os")));
+void arch_preboot_os(int os) __attribute__((weak, alias("__arch_preboot_os")));
 
 #if defined(__ARM__)
   #define IH_INITRD_ARCH IH_ARCH_ARM
@@ -571,7 +571,7 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 			break;
 		case BOOTM_STATE_OS_GO:
 			disable_interrupts();
-			arch_preboot_os();
+			arch_preboot_os(images.os.os);
 			boot_fn(BOOTM_STATE_OS_GO, argc, argv, &images);
 			break;
 	}
@@ -704,7 +704,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		return 1;
 	}
 
-	arch_preboot_os();
+	arch_preboot_os(images.os.os);
 
 	boot_fn(0, argc, argv, &images);
 
diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c
index 0041a60..100f8f4 100644
--- a/cpu/mpc85xx/cpu_init.c
+++ b/cpu/mpc85xx/cpu_init.c
@@ -382,7 +382,7 @@ int cpu_init_r(void)
 
 extern void setup_ivors(void);
 
-void arch_preboot_os(void)
+void arch_preboot_os(int os)
 {
 	u32 msr;
 
-- 
1.5.4



More information about the U-Boot mailing list