summaryrefslogtreecommitdiff
path: root/arch/arm/lib/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib/board.c')
-rw-r--r--arch/arm/lib/board.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 34f50b08a5..92e85c4db5 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -33,6 +33,7 @@
#include <nand.h>
#include <onenand_uboot.h>
#include <mmc.h>
+#include <scsi.h>
#include <libfdt.h>
#include <fdtdec.h>
#include <post.h>
@@ -105,8 +106,8 @@ static int display_banner(void)
{
printf("\n\n%s\n\n", version_string);
debug("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n",
- _TEXT_BASE,
- _bss_start_ofs + _TEXT_BASE, _bss_end_ofs + _TEXT_BASE);
+ (ulong)&_start,
+ (ulong)&__bss_start, (ulong)&__bss_end);
#ifdef CONFIG_MODEM_SUPPORT
debug("Modem Support enabled\n");
#endif
@@ -197,8 +198,6 @@ static int arm_pci_init(void)
*/
typedef int (init_fnc_t) (void);
-int print_cpuinfo(void);
-
void __dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
@@ -250,9 +249,7 @@ init_fnc_t *init_sequence[] = {
serial_init, /* serial communications setup */
console_init_f, /* stage 1 init of console */
display_banner, /* say that we are here */
-#if defined(CONFIG_DISPLAY_CPUINFO)
print_cpuinfo, /* display cpu info (and speed) */
-#endif
#if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */
#endif
@@ -277,13 +274,13 @@ void board_init_f(ulong bootflag)
memset((void *)gd, 0, sizeof(gd_t));
- gd->mon_len = _bss_end_ofs;
+ gd->mon_len = (ulong)&__bss_end - (ulong)_start;
#ifdef CONFIG_OF_EMBED
/* Get a pointer to the FDT */
- gd->fdt_blob = _binary_dt_dtb_start;
+ gd->fdt_blob = __dtb_db_begin;
#elif defined CONFIG_OF_SEPARATE
/* FDT is at end of image */
- gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
+ gd->fdt_blob = &_end;
#endif
/* Allow the early environment to override the fdt address */
gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
@@ -322,7 +319,7 @@ void board_init_f(ulong bootflag)
gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;
#endif
- addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
+ addr = CONFIG_SYS_SDRAM_BASE + get_effective_memsize();
#ifdef CONFIG_LOGBUFFER
#ifndef CONFIG_ALT_LB_ADDR
@@ -344,7 +341,7 @@ void board_init_f(ulong bootflag)
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
/* reserve TLB table */
- gd->arch.tlb_size = 4096 * 4;
+ gd->arch.tlb_size = PGTABLE_SIZE;
addr -= gd->arch.tlb_size;
/* round down to next 64 kB limit */
@@ -419,6 +416,7 @@ void board_init_f(ulong bootflag)
}
#endif
+#ifndef CONFIG_ARM64
/* setup stackpointer for exeptions */
gd->irq_sp = addr_sp;
#ifdef CONFIG_USE_IRQ
@@ -431,11 +429,14 @@ void board_init_f(ulong bootflag)
/* 8-byte alignment for ABI compliance */
addr_sp &= ~0x07;
+#else /* CONFIG_ARM64 */
+ /* 16-byte alignment for ABI compliance */
+ addr_sp &= ~0x0f;
+#endif /* CONFIG_ARM64 */
#else
addr_sp += 128; /* leave 32 words for abort-stack */
gd->irq_sp = addr_sp;
#endif
- interrupt_init();
debug("New Stack Pointer is: %08lx\n", addr_sp);
@@ -451,7 +452,7 @@ void board_init_f(ulong bootflag)
gd->relocaddr = addr;
gd->start_addr_sp = addr_sp;
- gd->reloc_off = addr - _TEXT_BASE;
+ gd->reloc_off = addr - (ulong)&_start;
debug("relocation Offset is: %08lx\n", gd->reloc_off);
if (new_fdt) {
memcpy(new_fdt, gd->fdt_blob, fdt_size);
@@ -516,7 +517,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
- monitor_flash_len = _end_ofs;
+ monitor_flash_len = (ulong)&__rel_dyn_end - (ulong)_start;
/* Enable caches */
enable_caches();
@@ -593,6 +594,11 @@ void board_init_r(gd_t *id, ulong dest_addr)
mmc_initialize(gd->bd);
#endif
+#ifdef CONFIG_CMD_SCSI
+ puts("SCSI: ");
+ scsi_init();
+#endif
+
#ifdef CONFIG_HAS_DATAFLASH
AT91F_DataflashInit();
dataflash_print_info();
@@ -637,6 +643,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
misc_init_r();
#endif
+ /* set up exceptions */
+ interrupt_init();
/* enable exceptions */
enable_interrupts();