Merge with git://www.denx.de/git/u-boot.git
[platform/kernel/u-boot.git] / lib_arm / board.c
index babc254..87848d9 100644 (file)
@@ -54,7 +54,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
 void nand_init (void);
 #endif
 
@@ -112,6 +112,30 @@ void *sbrk (ptrdiff_t increment)
 }
 
 /************************************************************************
+ * Coloured LED functionality
+ ************************************************************************
+ * May be supplied by boards if desired
+ */
+void inline __coloured_LED_init (void) {}
+void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); 
+void inline __red_LED_on (void) {}
+void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
+void inline __red_LED_off(void) {}
+void inline red_LED_off(void)       __attribute__((weak, alias("__red_LED_off"))); 
+void inline __green_LED_on(void) {}
+void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); 
+void inline __green_LED_off(void) {}
+void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); 
+void inline __yellow_LED_on(void) {}
+void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); 
+void inline __yellow_LED_off(void) {}
+void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); 
+
+
+
+
+
+/************************************************************************
  * Init Utilities                                                      *
  ************************************************************************
  * Some of this code should be moved into the core functions,
@@ -296,7 +320,7 @@ void start_armboot (void)
        /* armboot_start is defined in the board-specific linker script */
        mem_malloc_init (_armboot_start - CFG_MALLOC_LEN);
 
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
        puts ("NAND:  ");
        nand_init();            /* go init the NAND */
 #endif
@@ -314,6 +338,10 @@ void start_armboot (void)
        drv_vfd_init();
 #endif /* CONFIG_VFD */
 
+#ifdef CONFIG_SERIAL_MULTI
+       serial_initialize();
+#endif
+
        /* IP Address */
        gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
 
@@ -364,6 +392,13 @@ void start_armboot (void)
        enable_interrupts ();
 
        /* Perform network card initialisation if necessary */
+#ifdef CONFIG_DRIVER_TI_EMAC
+extern void dm644x_eth_set_mac_addr (const u_int8_t *addr);
+       if (getenv ("ethaddr")) {
+               dm644x_eth_set_mac_addr(gd->bd->bi_enetaddr);
+       }
+#endif
+
 #ifdef CONFIG_DRIVER_CS8900
        cs8900_get_enetaddr (gd->bd->bi_enetaddr);
 #endif
@@ -378,16 +413,16 @@ void start_armboot (void)
        if ((s = getenv ("loadaddr")) != NULL) {
                load_addr = simple_strtoul (s, NULL, 16);
        }
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
        if ((s = getenv ("bootfile")) != NULL) {
                copy_filename (BootFile, s, sizeof (BootFile));
        }
-#endif /* CFG_CMD_NET */
+#endif
 
 #ifdef BOARD_LATE_INIT
        board_late_init ();
 #endif
-#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
        puts ("Net:   ");
 #endif