summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-11-14 22:57:45 +0300
committerTom Rini <trini@konsulko.com>2019-12-03 02:25:04 +0300
commit67c4e9f815eb75ba5c1f86213eded93c4e06e64b (patch)
treeb09bb6915a2eff5045b3becb4ae595d0bf3534c9 /include
parent428a6a18fe5ad5c007fd79a905429ee3ef3af1ea (diff)
downloadu-boot-67c4e9f815eb75ba5c1f86213eded93c4e06e64b.tar.xz
common: Move board_get_usable_ram_top() out of common.h
Move this function into init.h which seems to be designed for this sort of thing. Also update the header to declare struct global_data so that it can be included without global_data.h being needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/common.h11
-rw-r--r--include/init.h20
2 files changed, 18 insertions, 13 deletions
diff --git a/include/common.h b/include/common.h
index 16d4b0612f..9bdd1cf85c 100644
--- a/include/common.h
+++ b/include/common.h
@@ -74,17 +74,6 @@ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */
int mdm_init(void);
/**
- * Get the uppermost pointer that is valid to access
- *
- * Some systems may not map all of their address space. This function allows
- * boards to indicate what their highest support pointer value is for DRAM
- * access.
- *
- * @param total_size Size of U-Boot (unused?)
- */
-ulong board_get_usable_ram_top(ulong total_size);
-
-/**
* arch_fixup_fdt() - Write arch-specific information to fdt
*
* Defined in arch/$(ARCH)/lib/bootm-fdt.c
diff --git a/include/init.h b/include/init.h
index afc953d51e..6076283d2c 100644
--- a/include/init.h
+++ b/include/init.h
@@ -10,6 +10,8 @@
#ifndef __INIT_H_
#define __INIT_H_ 1
+#include <linux/types.h>
+
#ifndef __ASSEMBLY__ /* put C only stuff in this section */
/*
@@ -149,6 +151,8 @@ ulong board_init_f_alloc_reserve(ulong top);
*/
void board_init_f_init_reserve(ulong base);
+struct global_data;
+
/**
* arch_setup_gd() - Set up the global_data pointer
* @gd_ptr: Pointer to global data
@@ -160,10 +164,11 @@ void board_init_f_init_reserve(ulong base);
*
* gd = gd_ptr;
*/
-void arch_setup_gd(gd_t *gd_ptr);
+void arch_setup_gd(struct global_data *gd_ptr);
/* common/board_r.c */
-void board_init_r(gd_t *id, ulong dest_addr) __attribute__ ((noreturn));
+void board_init_r(struct global_data *id, ulong dest_addr)
+ __attribute__ ((noreturn));
int cpu_init_r(void);
int last_stage_init(void);
@@ -181,6 +186,17 @@ int init_func_vid(void);
int checkboard(void);
int show_board_info(void);
+/**
+ * Get the uppermost pointer that is valid to access
+ *
+ * Some systems may not map all of their address space. This function allows
+ * boards to indicate what their highest support pointer value is for DRAM
+ * access.
+ *
+ * @param total_size Size of U-Boot (unused?)
+ */
+ulong board_get_usable_ram_top(ulong total_size);
+
#endif /* __ASSEMBLY__ */
/* Put only stuff here that the assembler can digest */