]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/board_f.c
CPCI4052: Remove CONFIG_SYS_LONGHELP
[karo-tx-uboot.git] / common / board_f.c
index 290fd6507f444c7bc17dd48d15a843fa3035539b..0c9e5d11fafb37cba06ed4bcb5810d9618e59095 100644 (file)
@@ -23,6 +23,7 @@
 #include <i2c.h>
 #include <initcall.h>
 #include <logbuff.h>
+#include <malloc.h>
 #include <mapmem.h>
 
 /* TODO: Can we move these into arch/ headers? */
@@ -72,7 +73,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #endif
 
 /*
- * sjg: IMO this code should be
+ * TODO(sjg@chromium.org): IMO this code should be
  * refactored to a single function, something like:
  *
  * void led_set_state(enum led_colour_t colour, int on);
@@ -304,7 +305,7 @@ __weak ulong board_get_usable_ram_top(ulong total_size)
 {
 #ifdef CONFIG_SYS_SDRAM_BASE
        /*
-        * Detect whether we have so much RAM it goes past the end of our
+        * Detect whether we have so much RAM that it goes past the end of our
         * 32-bit address space. If so, clip the usable RAM so it doesn't.
         */
        if (gd->ram_top < CONFIG_SYS_SDRAM_BASE)
@@ -511,7 +512,7 @@ static int reserve_global_data(void)
 static int reserve_fdt(void)
 {
        /*
-        * If the device tree is sitting immediate above our image then we
+        * If the device tree is sitting immediately above our image then we
         * must relocate it. If it is embedded in the data section, then it
         * will be relocated with other data.
         */
@@ -539,7 +540,7 @@ static int reserve_stacks(void)
        gd->start_addr_sp &= ~0xf;
 
        /*
-        * let the architecture specific code tailor gd->start_addr_sp and
+        * let the architecture-specific code tailor gd->start_addr_sp and
         * gd->irq_sp
         */
        return arch_reserve_stacks();
@@ -560,7 +561,6 @@ static int setup_board_part1(void)
        /*
         * Save local variables to board info struct
         */
-
        bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;        /* start of memory */
        bd->bi_memsize = gd->ram_size;                  /* size in bytes */
 
@@ -729,17 +729,6 @@ static int mark_bootstage(void)
        return 0;
 }
 
-static int initf_malloc(void)
-{
-#ifdef CONFIG_SYS_MALLOC_F_LEN
-       assert(gd->malloc_base);        /* Set up by crt0.S */
-       gd->malloc_limit = gd->malloc_base + CONFIG_SYS_MALLOC_F_LEN;
-       gd->malloc_ptr = 0;
-#endif
-
-       return 0;
-}
-
 static int initf_dm(void)
 {
 #if defined(CONFIG_DM) && defined(CONFIG_SYS_MALLOC_F_LEN)
@@ -770,7 +759,7 @@ static init_fnc_t init_sequence_f[] = {
 #endif
        setup_mon_len,
 #ifdef CONFIG_OF_CONTROL
-       setup_fdt,
+       fdtdec_setup,
 #endif
 #ifdef CONFIG_TRACE
        trace_early_init,
@@ -782,9 +771,6 @@ static init_fnc_t init_sequence_f[] = {
 #endif
        arch_cpu_init,          /* basic arch cpu dependent setup */
        mark_bootstage,
-#ifdef CONFIG_OF_CONTROL
-       fdtdec_check_fdt,
-#endif
        initf_dm,
        arch_cpu_init_dm,
 #if defined(CONFIG_BOARD_EARLY_INIT_F)