]> git.sur5r.net Git - u-boot/blobdiff - board/cm5200/cm5200.c
board_f: Drop return value from initdram()
[u-boot] / board / cm5200 / cm5200.c
index e391dfc9e1bd1ee6fe215d2738e3546aec0bad41..be0d65c694eb8b1fd3d1ef96d1ebe781b851b169 100644 (file)
@@ -16,7 +16,7 @@
  *      - run-time SDRAM controller configuration
  *      - LIBFDT support
  *
- * SPDX-License-Identifier:    GPL-2.0+ 
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -97,14 +97,14 @@ static mem_conf_t* get_mem_config(int board_type)
 /*
  * Initalize SDRAM - configure SDRAM controller, detect memory size.
  */
-phys_size_t initdram(int board_type)
+int initdram(void)
 {
        ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
        ulong test1, test2;
        mem_conf_t *mem_conf;
 
-       mem_conf = get_mem_config(board_type);
+       mem_conf = get_mem_config(gd->board_type);
 
        /* configure SDRAM start/end for detection */
        *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x0000001e; /* 2G at 0x0 */
@@ -150,7 +150,9 @@ phys_size_t initdram(int board_type)
        *(vu_long *)MPC5XXX_SDRAM_SDELAY = 0x04;
        __asm__ volatile ("sync");
 
-       return dramsize;
+       gd->ram_size = dramsize;
+
+       return 0;
 }
 
 
@@ -237,7 +239,7 @@ static void compose_hostname(hw_id_t hw_id, char *buf)
 }
 
 
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
+#ifdef CONFIG_OF_BOARD_SETUP
 /*
  * Update 'model' and 'memory' properties in the blob according to the module
  * that we are running on.
@@ -255,7 +257,7 @@ static void ft_blob_update(void *blob, bd_t *bd)
        printf("ft_blob_update(): cannot set /model property err:%s\n",
                fdt_strerror(ret));
 }
-#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
+#endif /* CONFIG_OF_BOARD_SETUP */
 
 
 /*
@@ -358,10 +360,12 @@ int last_stage_init(void)
 #endif /* CONFIG_LAST_STAGE_INIT */
 
 
-#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *blob, bd_t *bd)
 {
        ft_cpu_setup(blob, bd);
        ft_blob_update(blob, bd);
+
+       return 0;
 }
-#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
+#endif /* CONFIG_OF_BOARD_SETUP */