]> git.sur5r.net Git - u-boot/blobdiff - lib_sh/board.c
sf: set common timeouts in seconds, not milliseconds
[u-boot] / lib_sh / board.c
index 6dfab4ec9e0c54c354cbc6584dcedc24c8e7e4f2..2fd213ba3dd1fd7c4aae3c766ab239535ee2bc37 100644 (file)
@@ -22,6 +22,7 @@
 #include <command.h>
 #include <malloc.h>
 #include <devices.h>
+#include <timestamp.h>
 #include <version.h>
 #include <watchdog.h>
 #include <net.h>
@@ -33,9 +34,9 @@ extern int board_init(void);
 extern int dram_init(void);
 extern int timer_init(void);
 
-const char version_string[] = U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+const char version_string[] = U_BOOT_VERSION" ("U_BOOT_DATE" - "U_BOOT_TIME")";
 
-unsigned long monitor_flash_len = CFG_MONITOR_LEN;
+unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
 
 static unsigned long mem_malloc_start;
 static unsigned long mem_malloc_end;
@@ -44,8 +45,8 @@ static unsigned long mem_malloc_brk;
 static void mem_malloc_init(void)
 {
 
-       mem_malloc_start = (TEXT_BASE - CFG_GBL_DATA_SIZE - CFG_MALLOC_LEN);
-       mem_malloc_end = (mem_malloc_start + CFG_MALLOC_LEN - 16);
+       mem_malloc_start = (TEXT_BASE - CONFIG_SYS_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN);
+       mem_malloc_end = (mem_malloc_start + CONFIG_SYS_MALLOC_LEN - 16);
        mem_malloc_brk = mem_malloc_start;
        memset((void *) mem_malloc_start, 0,
                (mem_malloc_end - mem_malloc_start));
@@ -124,17 +125,7 @@ static int sh_mem_env_init(void)
 static int sh_net_init(void)
 {
        DECLARE_GLOBAL_DATA_PTR;
-       char *s, *e;
-       int i;
-
        gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
-       s = getenv("ethaddr");
-       for (i = 0; i < 6; ++i) {
-               gd->bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0;
-               if (s)
-                       s = (*e) ? e + 1 : e;
-       }
-
        return 0;
 }
 #endif
@@ -178,7 +169,7 @@ void sh_generic_init(void)
        bd_t *bd;
        init_fnc_t **init_fnc_ptr;
 
-       memset(gd, 0, CFG_GBL_DATA_SIZE);
+       memset(gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
@@ -188,12 +179,12 @@ void sh_generic_init(void)
        gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
 
        bd = gd->bd;
-       bd->bi_memstart = CFG_SDRAM_BASE;
-       bd->bi_memsize = CFG_SDRAM_SIZE;
-       bd->bi_flashstart = CFG_FLASH_BASE;
-#if defined(CFG_SRAM_BASE) && defined(CFG_SRAM_SIZE)
-       bd->bi_sramstart = CFG_SRAM_BASE;
-       bd->bi_sramsize = CFG_SRAM_SIZE;
+       bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
+       bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
+       bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
+#if defined(CONFIG_SYS_SRAM_BASE) && defined(CONFIG_SYS_SRAM_SIZE)
+       bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
+       bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
 #endif
        bd->bi_baudrate = CONFIG_BAUDRATE;