From: Valentin Longchamp <valentin.longchamp@keymile.com>
Date: Fri, 3 Oct 2014 09:45:23 +0000 (+0200)
Subject: powerpc/mpc83xx: Zero boot_flags arg for calling board_init_f()
X-Git-Tag: v2025.01-rc5-pxa1908~14309^2~2
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=e83a7e9453295753e84ab51221d167e87cac67aa;p=u-boot.git

powerpc/mpc83xx: Zero boot_flags arg for calling board_init_f()

The argument boot_flags of board_init_f() is not used at all in the
powerpc specific board.c init sequence. Now with the generic init
sequence, this boot_flags arg is used by board_init_f().

This patch sets the r3 register that is used to pass the boot_flags
argument from the start.S board_init_f() call to 0 prior to the function
call to avoid unknown content to end up in gd->flags.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
---

diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index af75c63eb3..9bd86d82d6 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -283,6 +283,7 @@ in_flash:
 	bl	cpu_init_f
 
 	/* run 1st part of board init code (in Flash)*/
+	li	r3, 0		/* clear boot_flag for calling board_init_f */
 	bl	board_init_f
 
 	/* NOTREACHED - board_init_f() does not return */