ARM: renesas: Save boot parameters passed in by ATF
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 18 Oct 2018 16:38:05 +0000 (18:38 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 9 Apr 2019 16:19:09 +0000 (18:19 +0200)
The ATF can pass additional information via the first four registers,
x0...x3. The R-Car Gen3 with mainline ATF, register x1 contains pointer
to a device tree with platform information. Save these registers for
future use.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
arch/arm/mach-rmobile/lowlevel_init_gen3.S

index f42b53fd88ace9fe49e75651df05e2a184de8553..213ec143e2774cf1c48a60feb566610ee3b81375 100644 (file)
 #include <linux/linkage.h>
 #include <asm/macro.h>
 
+.align 8
+.globl rcar_atf_boot_args
+rcar_atf_boot_args:
+       .dword 0
+       .dword 0
+       .dword 0
+       .dword 0
+
+ENTRY(save_boot_params)
+       adr     x8, rcar_atf_boot_args
+       stp     x0, x1, [x8], #16
+       stp     x2, x3, [x8], #16
+       b       save_boot_params_ret
+ENDPROC(save_boot_params)
+
 ENTRY(lowlevel_init)
        mov     x29, lr                 /* Save LR */