]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/nds32/lib/board.c
nds32: Drop tlb_addr from global data
[karo-tx-uboot.git] / arch / nds32 / lib / board.c
index 074aabf1e41e85171a7327c8dfc5fa95f402060f..09feaf3733057ce1b30ffef87aa1214943c57b04 100644 (file)
@@ -103,6 +103,7 @@ static int nds32_pci_init(void)
 #endif /* CONFIG_CMD_PCI || CONFIG_PCI */
 
 #if defined(CONFIG_PMU) || defined(CONFIG_PCU)
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
 static int pmu_init(void)
 {
 #if defined(CONFIG_FTPMU010_POWER)
@@ -115,6 +116,7 @@ static int pmu_init(void)
        return 0;
 }
 #endif
+#endif
 
 /*
  * Breathe some life into the board...
@@ -205,17 +207,6 @@ void board_init_f(ulong bootflag)
 
        addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
 
-#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
-       /* reserve TLB table */
-       addr -= (4096 * 4);
-
-       /* round down to next 64 kB limit */
-       addr &= ~(0x10000 - 1);
-
-       gd->tlb_addr = addr;
-       debug("TLB table at: %08lx\n", addr);
-#endif
-
        /* round down to next 4 kB limit */
        addr &= ~(4096 - 1);
        debug("Top of RAM usable for U-Boot at: %08lx\n", addr);
@@ -301,12 +292,9 @@ void board_init_f(ulong bootflag)
  */
 void board_init_r(gd_t *id, ulong dest_addr)
 {
-       char *s;
        bd_t *bd;
        ulong malloc_start;
 
-       extern void malloc_bin_reloc(void);
-
        gd = id;
        bd = gd->bd;
 
@@ -321,13 +309,11 @@ void board_init_r(gd_t *id, ulong dest_addr)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
-#ifdef CONFIG_SERIAL_MULTI
        serial_initialize();
-#endif
 
        debug("Now running in RAM - U-Boot at: %08lx\n", dest_addr);
 
@@ -369,9 +355,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
        nds32_pci_init();
 #endif
 
-       /* IP Address */
-       gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
-
        stdio_init();   /* get the devices list going. */
 
        jumptable_init();
@@ -402,13 +385,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
        /* Initialize from environment */
        load_addr = getenv_ulong("loadaddr", 16, load_addr);
 
-#if defined(CONFIG_CMD_NET)
-       s = getenv("bootfile");
-       if (s != NULL)
-               copy_filename(BootFile, s, sizeof(BootFile));
-#endif
-
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
        board_late_init();
 #endif