From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 21 Mar 2019 19:01:06 +0100 Subject: [U-Boot] [PATCH v3 07/19] ARM: tegra: Fix save_boot_params() prototype In-Reply-To: <20190321180118.26475-1-thierry.reding@gmail.com> References: <20190321180118.26475-1-thierry.reding@gmail.com> Message-ID: <20190321180118.26475-8-thierry.reding@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Thierry Reding The save_boot_params() function takes as its first four arguments the first four registers. On 32-bit ARM these are r0, r1, r2 and r3, all of which are 32 bits wide. However, on 64-bit ARM thene registers are x0, x1, x2 and x3, all of which are 64 bits wide. In order to allow reusing the save_boot_params() implementation on 64-bit ARM, change it to take unsigned long parameters rather than the fixed size 32-bit integers. This ensures that the correct values are passed. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c index b65bdde5a78d..59d2f347485d 100644 --- a/arch/arm/mach-tegra/board.c +++ b/arch/arm/mach-tegra/board.c @@ -42,7 +42,8 @@ enum { static bool from_spl __attribute__ ((section(".data"))); #ifndef CONFIG_SPL_BUILD -void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) +void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2, + unsigned long r3) { from_spl = r0 != UBOOT_NOT_LOADED_FROM_SPL; save_boot_params_ret(); -- 2.21.0