summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/system.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-02-07 10:47:28 -0700
committerHans de Goede <hdegoede@redhat.com>2015-02-16 20:14:54 +0100
commite11c6c279d823dc0d2f470c5c2e3c0a9854a640f (patch)
tree31ae3d1bd015ec97d889ad6dc45baf5e1e127913 /arch/arm/include/asm/system.h
parentc924e2a8036f43f2f4a8e829ecfc8e9d6e8cce63 (diff)
downloadtalos-obmc-uboot-e11c6c279d823dc0d2f470c5c2e3c0a9854a640f.tar.gz
talos-obmc-uboot-e11c6c279d823dc0d2f470c5c2e3c0a9854a640f.zip
arm: Allow lr to be saved by board code
The link register value can be required on some boards (e.g. FEL mode on sunxi) so use a branch instruction to jump to save_boot_params() instead of a branch link. This requires a branch back to save_boot_params_ret so adjust the users to deal with this. For exynos just drop the function since it doesn't do anything. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'arch/arm/include/asm/system.h')
-rw-r--r--arch/arm/include/asm/system.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 89f2294689..7820486df0 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -142,6 +142,21 @@ void flush_l3_cache(void);
#ifndef __ASSEMBLY__
+/**
+ * save_boot_params() - Save boot parameters before starting reset sequence
+ *
+ * If you provide this function it will be called immediately U-Boot starts,
+ * both for SPL and U-Boot proper.
+ *
+ * All registers are unchanged from U-Boot entry. No registers need be
+ * preserved.
+ *
+ * This is not a normal C function. There is no stack. Return by branching to
+ * save_boot_params_ret.
+ *
+ * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3);
+ */
+
#define isb() __asm__ __volatile__ ("" : : : "memory")
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
OpenPOWER on IntegriCloud