summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/system.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-05-04 11:31:03 -0600
committerSimon Glass <sjg@chromium.org>2015-05-14 18:49:34 -0600
commit5519912164698b634893913b4408fee736d01d06 (patch)
tree055c30565c23a1c623a5013be9590e111e8d3a6f /arch/arm/include/asm/system.h
parent5a942a1527766c27674ea71222a2a98982e8a661 (diff)
downloadtalos-obmc-uboot-5519912164698b634893913b4408fee736d01d06.tar.gz
talos-obmc-uboot-5519912164698b634893913b4408fee736d01d06.zip
arm: Add a prototype for save_boot_params_ret()
It is convenient for some boards to implement save_boot_params() in C rather than assembler. Provide a way to return in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'arch/arm/include/asm/system.h')
-rw-r--r--arch/arm/include/asm/system.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index fe103352fc..760e8ab1c8 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -159,6 +159,22 @@ void flush_l3_cache(void);
* void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3);
*/
+/**
+ * save_boot_params_ret() - Return from save_boot_params()
+ *
+ * If you provide save_boot_params(), then you should jump back to this
+ * function when done. Try to preserve all registers.
+ *
+ * If your implementation of save_boot_params() is in C then it is acceptable
+ * to simply call save_boot_params_ret() at the end of your function. Since
+ * there is no link register set up, you cannot just exit the function. U-Boot
+ * will return to the (initialised) value of lr, and likely crash/hang.
+ *
+ * If your implementation of save_boot_params() is in assembler then you
+ * should use 'b' or 'bx' to return to save_boot_params_ret.
+ */
+void save_boot_params_ret(void);
+
#define isb() __asm__ __volatile__ ("" : : : "memory")
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
OpenPOWER on IntegriCloud