X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=arch%2Fblackfin%2Flib%2Fboard.c;h=10223bdb791dfe7bd1ca55244f28577a16e6beeb;hp=288dc829d4d64567f10ee3e23948ec3d5727a401;hb=230187ce266889ad465b39ded6717805379e7ffe;hpb=76b40ab41eff1f402ee52ba768b09daad293b9bb diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 288dc829d4..10223bdb79 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -37,6 +37,10 @@ int post_flag; #endif +#if defined(CONFIG_SYS_I2C) +#include +#endif + DECLARE_GLOBAL_DATA_PTR; __attribute__((always_inline)) @@ -77,7 +81,7 @@ static void display_global_data(void) bd = gd->bd; printf(" gd: %p\n", gd); printf(" |-flags: %lx\n", gd->flags); - printf(" |-board_type: %lx\n", gd->board_type); + printf(" |-board_type: %lx\n", gd->arch.board_type); printf(" |-baudrate: %u\n", gd->baudrate); printf(" |-have_console: %lx\n", gd->have_console); printf(" |-ram_size: %lx\n", gd->ram_size); @@ -231,6 +235,8 @@ static int global_board_data_init(void) bd->bi_sclk = get_sclk(); bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; + bd->bi_baudrate = (gd->baudrate > 0) + ? simple_strtoul(gd->baudrate, NULL, 10) : CONFIG_BAUDRATE; return 0; } @@ -277,9 +283,9 @@ void board_init_f(ulong bootflag) dcache_enable(); #endif -#ifdef CONFIG_WATCHDOG +#ifdef CONFIG_HW_WATCHDOG serial_early_puts("Setting up external watchdog\n"); - watchdog_init(); + hw_watchdog_init(); #endif #ifdef DEBUG @@ -385,6 +391,9 @@ void board_init_r(gd_t * id, ulong dest_addr) mmc_initialize(bd); #endif +#if defined(CONFIG_SYS_I2C) + i2c_reloc_fixup(); +#endif /* relocate environment function pointers etc. */ env_relocate(); @@ -432,17 +441,3 @@ void board_init_r(gd_t * id, ulong dest_addr) for (;;) main_loop(); } - -void hang(void) -{ -#ifdef CONFIG_STATUS_LED - status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF); - status_led_set(STATUS_LED_CRASH, STATUS_LED_BLINKING); -#endif - puts("### ERROR ### Please RESET the board ###\n"); - while (1) - /* If a JTAG emulator is hooked up, we'll automatically trigger - * a breakpoint in it. If one isn't, this is just a NOP. - */ - asm("emuexcpt;"); -}