summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDavid Feng <fenghua@phytium.com.cn>2013-12-14 11:47:36 +0800
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-01-09 16:08:46 +0100
commitcce6be7f081edc19ecc3f0ff0f811e5300be2de6 (patch)
tree1cc11e5f81082344428498226a5498403fa08355 /common
parent0ae7653128c80a4f2920cbe9b124792c2fd9d9e0 (diff)
downloadu-boot-imx-cce6be7f081edc19ecc3f0ff0f811e5300be2de6.zip
u-boot-imx-cce6be7f081edc19ecc3f0ff0f811e5300be2de6.tar.gz
u-boot-imx-cce6be7f081edc19ecc3f0ff0f811e5300be2de6.tar.bz2
arm64: generic board support
Signed-off-by: David Feng <fenghua@phytium.com.cn>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/common/board_f.c b/common/board_f.c
index f0664bc..d918e4b 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -462,7 +462,7 @@ static int reserve_round_4k(void)
static int reserve_mmu(void)
{
/* reserve TLB table */
- gd->arch.tlb_size = 4096 * 4;
+ gd->arch.tlb_size = PGTABLE_SIZE;
gd->relocaddr -= gd->arch.tlb_size;
/* round down to next 64 kB limit */
@@ -614,7 +614,7 @@ static int reserve_stacks(void)
* TODO(sjg@chromium.org): Perhaps create arch_reserve_stack()
* to handle this and put in arch/xxx/lib/stack.c
*/
-# ifdef CONFIG_ARM
+# if defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
# ifdef CONFIG_USE_IRQ
gd->start_addr_sp -= (CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ);
debug("Reserving %zu Bytes for IRQ stack at: %08lx\n",
@@ -811,11 +811,6 @@ static int mark_bootstage(void)
}
static init_fnc_t init_sequence_f[] = {
-#if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC512X) && \
- !defined(CONFIG_MPC83xx) && !defined(CONFIG_MPC85xx) && \
- !defined(CONFIG_MPC86xx) && !defined(CONFIG_X86)
- zero_global_data,
-#endif
#ifdef CONFIG_SANDBOX
setup_ram_buf,
#endif
@@ -1009,6 +1004,17 @@ void board_init_f(ulong boot_flags)
gd = &data;
#endif
+ /*
+ * Clear global data before it is accessed at debug print
+ * in initcall_run_list. Otherwise the debug print probably
+ * get the wrong vaule of gd->have_console.
+ */
+#if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC512X) && \
+ !defined(CONFIG_MPC83xx) && !defined(CONFIG_MPC85xx) && \
+ !defined(CONFIG_MPC86xx) && !defined(CONFIG_X86)
+ zero_global_data();
+#endif
+
gd->flags = boot_flags;
if (initcall_run_list(init_sequence_f))