projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-arm
[oweals/u-boot.git]
/
arch
/
arm
/
lib
/
board.c
diff --git
a/arch/arm/lib/board.c
b/arch/arm/lib/board.c
index 9b16d7552bab38c705403e1e9ba4145b41289290..f1951e883e183c73558403ae2ed959fce3063fca 100644
(file)
--- a/
arch/arm/lib/board.c
+++ b/
arch/arm/lib/board.c
@@
-73,10
+73,6
@@
extern int AT91F_DataflashInit(void);
extern void dataflash_print_info(void);
#endif
extern void dataflash_print_info(void);
#endif
-#ifdef CONFIG_DRIVER_RTL8019
-extern void rtl8019_get_enetaddr (uchar * addr);
-#endif
-
#if defined(CONFIG_HARD_I2C) || \
defined(CONFIG_SOFT_I2C)
#include <i2c.h>
#if defined(CONFIG_HARD_I2C) || \
defined(CONFIG_SOFT_I2C)
#include <i2c.h>
@@
-228,10
+224,16
@@
void __dram_init_banksize(void)
void dram_init_banksize(void)
__attribute__((weak, alias("__dram_init_banksize")));
void dram_init_banksize(void)
__attribute__((weak, alias("__dram_init_banksize")));
+int __arch_cpu_init(void)
+{
+ return 0;
+}
+int arch_cpu_init(void)
+ __attribute__((weak, alias("__arch_cpu_init")));
+
init_fnc_t *init_sequence[] = {
init_fnc_t *init_sequence[] = {
-#if defined(CONFIG_ARCH_CPU_INIT)
arch_cpu_init, /* basic arch cpu dependent setup */
arch_cpu_init, /* basic arch cpu dependent setup */
-#endif
+
#if defined(CONFIG_BOARD_EARLY_INIT_F)
board_early_init_f,
#endif
#if defined(CONFIG_BOARD_EARLY_INIT_F)
board_early_init_f,
#endif
@@
-270,6
+272,8
@@
void board_init_f(ulong bootflag)
ulong reg;
#endif
ulong reg;
#endif
+ bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_F, "board_init_f");
+
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07);
/* compiler optimization barrier needed for GCC >= 3.4 */
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07);
/* compiler optimization barrier needed for GCC >= 3.4 */
@@
-295,6
+299,14
@@
void board_init_f(ulong bootflag)
}
}
}
}
+#ifdef CONFIG_OF_CONTROL
+ /* For now, put this check after the console is ready */
+ if (fdtdec_prepare_fdt()) {
+ panic("** CONFIG_OF_CONTROL defined but no FDT - please see "
+ "doc/README.fdt-control");
+ }
+#endif
+
debug("monitor len: %08lX\n", gd->mon_len);
/*
* Ram is setup, size stored in gd !!
debug("monitor len: %08lX\n", gd->mon_len);
/*
* Ram is setup, size stored in gd !!
@@
-459,6
+471,7
@@
void board_init_r(gd_t *id, ulong dest_addr)
gd = id;
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
gd = id;
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 = _end_ofs;
@@
-467,7
+480,15
@@
void board_init_r(gd_t *id, ulong dest_addr)
debug("monitor flash len: %08lX\n", monitor_flash_len);
board_init(); /* Setup chipselects */
debug("monitor flash len: %08lX\n", monitor_flash_len);
board_init(); /* Setup chipselects */
-
+ /*
+ * TODO: printing of the clock inforamtion of the board is now
+ * implemented as part of bdinfo command. Currently only support for
+ * davinci SOC's is added. Remove this check once all the board
+ * implement this.
+ */
+#ifdef CONFIG_CLOCKS
+ set_cpu_clk_info(); /* Setup clock information */
+#endif
#ifdef CONFIG_SERIAL_MULTI
serial_initialize();
#endif
#ifdef CONFIG_SERIAL_MULTI
serial_initialize();
#endif
@@
-485,6
+506,10
@@
void board_init_r(gd_t *id, ulong dest_addr)
malloc_start = dest_addr - TOTAL_MALLOC_LEN;
mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);
malloc_start = dest_addr - TOTAL_MALLOC_LEN;
mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);
+#ifdef CONFIG_ARCH_EARLY_INIT_R
+ arch_early_init_r();
+#endif
+
#if !defined(CONFIG_SYS_NO_FLASH)
puts("Flash: ");
#if !defined(CONFIG_SYS_NO_FLASH)
puts("Flash: ");
@@
-540,9
+565,6
@@
void board_init_r(gd_t *id, ulong dest_addr)
arm_pci_init();
#endif
arm_pci_init();
#endif
- /* IP Address */
- gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
-
stdio_init(); /* get the devices list going. */
jumptable_init();
stdio_init(); /* get the devices list going. */
jumptable_init();
@@
-580,16
+602,8
@@
void board_init_r(gd_t *id, ulong dest_addr)
/* Initialize from environment */
load_addr = getenv_ulong("loadaddr", 16, load_addr);
/* Initialize from environment */
load_addr = getenv_ulong("loadaddr", 16, load_addr);
-#if defined(CONFIG_CMD_NET)
- {
- char *s = getenv("bootfile");
-
- if (s != NULL)
- copy_filename(BootFile, s, sizeof(BootFile));
- }
-#endif
-#ifdef BOARD_LATE_INIT
+#ifdef
CONFIG_
BOARD_LATE_INIT
board_late_init();
#endif
board_late_init();
#endif