#include <common.h>
#include <command.h>
#include <stdio_dev.h>
+#include <serial.h>
#include <environment.h>
#include <malloc.h>
#include <mmc.h>
#include <net.h>
-#include <timestamp.h>
#include <status_led.h>
#include <version.h>
DECLARE_GLOBAL_DATA_PTR;
-const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
-
__attribute__((always_inline))
static inline void serial_early_puts(const char *s)
{
static int display_banner(void)
{
- printf("\n\n%s\n\n", version_string);
+ display_options();
printf("CPU: ADSP %s "
"(Detected Rev: 0.%d) "
"(%s boot)\n",
void board_init_f(ulong bootflag)
{
- ulong addr;
bd_t *bd;
char buf[32];
#endif
#ifdef DEBUG
- if (CONFIG_SYS_GBL_DATA_SIZE < sizeof(*gd))
+ if (GENERATED_GBL_DATA_SIZE < sizeof(*gd))
hang();
#endif
serial_early_puts("Init global data\n");
gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
- memset((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
-
- /* Board data initialization */
- addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t));
+ memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
- /* Align to 4 byte boundary */
- addr &= ~(4 - 1);
- bd = (bd_t *) addr;
+ bd = (bd_t *) (CONFIG_SYS_BD_INFO_ADDR);
gd->bd = bd;
- memset((void *)bd, 0, sizeof(bd_t));
+ memset((void *)bd, 0, GENERATED_BD_INFO_SIZE);
bd->bi_r_version = version_string;
bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
init_baudrate();
serial_early_puts("Serial init\n");
serial_init();
+#ifdef CONFIG_SERIAL_MULTI
+ serial_initialize();
+#endif
serial_early_puts("Console init flash\n");
console_init_f();
serial_early_puts("End of early debugging\n");
printf("Core: %s MHz, ", strmhz(buf, get_cclk()));
printf("System: %s MHz\n", strmhz(buf, get_sclk()));
- printf("RAM: ");
- print_size(bd->bi_memsize, "\n");
+ if (CONFIG_MEM_SIZE) {
+ printf("RAM: ");
+ print_size(bd->bi_memsize, "\n");
+ }
+
#if defined(CONFIG_POST)
post_init_f();
post_bootmode_init();
#if defined(CONFIG_POST)
post_output_backlog();
- post_reloc();
#endif
/* initialize malloc() area */
#endif
#ifdef CONFIG_GENERIC_MMC
- puts("MMC: ");
+ puts("MMC: ");
mmc_initialize(bd);
#endif
post_run(NULL, POST_RAM | post_bootmode_get(0));
#endif
- if (bfin_os_log_check()) {
+ if (CONFIG_MEM_SIZE && bfin_os_log_check()) {
puts("\nLog buffer from operating system:\n");
bfin_os_log_dump();
puts("\n");