summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.devel@googlemail.com>2015-02-06 23:06:45 +0100
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-02-17 22:52:42 +0100
commit68145d4c7b3aa83d74c2dc904a39fab17cee1691 (patch)
treea4b3b7204d322654ecd5afe9cc05a5f043adfa9f /include/common.h
parent4db896236cdac37db17b215ba3ff2d2701bddb49 (diff)
downloadu-boot-imx-68145d4c7b3aa83d74c2dc904a39fab17cee1691.zip
u-boot-imx-68145d4c7b3aa83d74c2dc904a39fab17cee1691.tar.gz
u-boot-imx-68145d4c7b3aa83d74c2dc904a39fab17cee1691.tar.bz2
common/board_f: factor out reserve_stacks
Introduce arch_reserve_stacks() to tailor gd->start_addr_sp and gd->irq_sp to the architecture needs. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 9129454..77c55c6 100644
--- a/include/common.h
+++ b/include/common.h
@@ -253,6 +253,24 @@ int update_flash_size(int flash_size);
int arch_early_init_r(void);
/**
+ * Reserve all necessary stacks
+ *
+ * This is used in generic board init sequence in common/board_f.c. Each
+ * architecture could provide this function to tailor the required stacks.
+ *
+ * On entry gd->start_addr_sp is pointing to the suggested top of the stack.
+ * The callee ensures gd->start_add_sp is 16-byte aligned, so architectures
+ * require only this can leave it untouched.
+ *
+ * On exit gd->start_addr_sp and gd->irq_sp should be set to the respective
+ * positions of the stack. The stack pointer(s) will be set to this later.
+ * gd->irq_sp is only required, if the architecture needs it.
+ *
+ * @return 0 if no error
+ */
+__weak int arch_reserve_stacks(void);
+
+/**
* Show the DRAM size in a board-specific way
*
* This is used by boards to display DRAM information in their own way.