]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib_arm/board.c
EP88x: fix broken linker script
[karo-tx-uboot.git] / lib_arm / board.c
index fe68df075a107e8a7c20bbd443137ecfbf5657c3..5d05d9b9279b96a2df848dd264c7ede4c9f62075 100644 (file)
@@ -73,7 +73,7 @@ const char version_string[] =
        U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING;
 
 #ifdef CONFIG_DRIVER_CS8900
-extern void cs8900_get_enetaddr (uchar * addr);
+extern void cs8900_get_enetaddr (void);
 #endif
 
 #ifdef CONFIG_DRIVER_RTL8019
@@ -145,6 +145,9 @@ void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")))
  * but let's get it working (again) first...
  */
 
+#if defined(CONFIG_ARM_DCC) && !defined(CONFIG_BAUDRATE)
+#define CONFIG_BAUDRATE 115200
+#endif
 static int init_baudrate (void)
 {
        char tmp[64];   /* long enough for environment variables */
@@ -255,10 +258,13 @@ static int arm_pci_init(void)
  */
 typedef int (init_fnc_t) (void);
 
-int print_cpuinfo (void); /* test-only */
+int print_cpuinfo (void);
 
 init_fnc_t *init_sequence[] = {
        cpu_init,               /* basic cpu dependent setup */
+#if defined(CONFIG_ARCH_CPU_INIT)
+       arch_cpu_init,          /* basic arch cpu dependent setup */
+#endif
        board_init,             /* basic board dependent setup */
        interrupt_init,         /* set up exceptions */
        env_init,               /* initialize environment */
@@ -287,9 +293,6 @@ void start_armboot (void)
 {
        init_fnc_t **init_fnc_ptr;
        char *s;
-#if !defined(CONFIG_SYS_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD)
-       ulong size;
-#endif
 #if defined(CONFIG_VFD) || defined(CONFIG_LCD)
        unsigned long addr;
 #endif
@@ -315,8 +318,7 @@ void start_armboot (void)
 
 #ifndef CONFIG_SYS_NO_FLASH
        /* configure available FLASH banks */
-       size = flash_init ();
-       display_flash_config (size);
+       display_flash_config (flash_init ());
 #endif /* CONFIG_SYS_NO_FLASH */
 
 #ifdef CONFIG_VFD
@@ -328,7 +330,7 @@ void start_armboot (void)
         */
        /* bss_end is defined in the board-specific linker script */
        addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-       size = vfd_setmem (addr);
+       vfd_setmem (addr);
        gd->fb_base = addr;
 #endif /* CONFIG_VFD */
 
@@ -343,7 +345,7 @@ void start_armboot (void)
                 */
                /* bss_end is defined in the board-specific linker script */
                addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-               size = lcd_setmem (addr);
+               lcd_setmem (addr);
                gd->fb_base = addr;
        }
 #endif /* CONFIG_LCD */
@@ -380,40 +382,8 @@ void start_armboot (void)
        /* IP Address */
        gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
 
-       /* MAC Address */
-       {
-               int i;
-               ulong reg;
-               char *s, *e;
-               char tmp[64];
-
-               i = getenv_r ("ethaddr", tmp, sizeof (tmp));
-               s = (i > 0) ? tmp : NULL;
-
-               for (reg = 0; reg < 6; ++reg) {
-                       gd->bd->bi_enetaddr[reg] = s ? simple_strtoul (s, &e, 16) : 0;
-                       if (s)
-                               s = (*e) ? e + 1 : e;
-               }
-
-#ifdef CONFIG_HAS_ETH1
-               i = getenv_r ("eth1addr", tmp, sizeof (tmp));
-               s = (i > 0) ? tmp : NULL;
-
-               for (reg = 0; reg < 6; ++reg) {
-                       gd->bd->bi_enet1addr[reg] = s ? simple_strtoul (s, &e, 16) : 0;
-                       if (s)
-                               s = (*e) ? e + 1 : e;
-               }
-#endif
-       }
-
        devices_init ();        /* get the devices list going. */
 
-#ifdef CONFIG_CMC_PU2
-       load_sernum_ethaddr ();
-#endif /* CONFIG_CMC_PU2 */
-
        jumptable_init ();
 
 #if defined(CONFIG_API)
@@ -433,19 +403,26 @@ void start_armboot (void)
 
        /* Perform network card initialisation if necessary */
 #ifdef CONFIG_DRIVER_TI_EMAC
+       /* XXX: this needs to be moved to board init */
 extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
        if (getenv ("ethaddr")) {
-               davinci_eth_set_mac_addr(gd->bd->bi_enetaddr);
+               uchar enetaddr[6];
+               eth_getenv_enetaddr("ethaddr", enetaddr);
+               davinci_eth_set_mac_addr(enetaddr);
        }
 #endif
 
 #ifdef CONFIG_DRIVER_CS8900
-       cs8900_get_enetaddr (gd->bd->bi_enetaddr);
+       /* XXX: this needs to be moved to board init */
+       cs8900_get_enetaddr ();
 #endif
 
 #if defined(CONFIG_DRIVER_SMC91111) || defined (CONFIG_DRIVER_LAN91C96)
+       /* XXX: this needs to be moved to board init */
        if (getenv ("ethaddr")) {
-               smc_set_mac_addr(gd->bd->bi_enetaddr);
+               uchar enetaddr[6];
+               eth_getenv_enetaddr("ethaddr", enetaddr);
+               smc_set_mac_addr(enetaddr);
        }
 #endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */