]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/blackfin/lib/board.c
Merge branch 'master' of git://git.denx.de/u-boot-mmc
[karo-tx-uboot.git] / arch / blackfin / lib / board.c
index 75b6c463d87ba0348af947a5a1466a51c94aae4b..facbc7a563f34eb8cb9ebccb5626d7c033a82665 100644 (file)
@@ -19,6 +19,7 @@
 #include <net.h>
 #include <status_led.h>
 #include <version.h>
+#include <watchdog.h>
 
 #include <asm/cplb.h>
 #include <asm/mach-common/bits/mpu.h>
 int post_flag;
 #endif
 
+#if defined(CONFIG_SYS_I2C)
+#include <i2c.h>
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 __attribute__((always_inline))
@@ -63,6 +68,7 @@ static int display_banner(void)
 static int init_baudrate(void)
 {
        gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
+       gd->bd->bi_baudrate = gd->baudrate;
        return 0;
 }
 
@@ -136,7 +142,8 @@ void init_cplbtables(void)
        ++i;
 #if defined(__ADSPBF60x__)
        icplb_add(0x0, 0x0);
-       dcplb_add(CONFIG_SYS_FLASH_BASE, SDRAM_EBIU);
+       dcplb_add(CONFIG_SYS_FLASH_BASE, PAGE_SIZE_16MB | CPLB_DIRTY |
+               CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID);
        ++i;
 #endif
 
@@ -277,9 +284,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 +392,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 +442,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;");
-}