]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/a4m072/a4m072.c
board_f: Rename initdram() to dram_init()
[people/ms/u-boot.git] / board / a4m072 / a4m072.c
index 09a5a5183bf9e4e6fa91ab5c79a230f0638be338..6f0d4489a25ab74ceac6d65599b7fe7f5b648c86 100644 (file)
@@ -8,23 +8,7 @@
  * (C) Copyright 2010
  * Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -39,6 +23,8 @@
 
 #include "mt46v32m16.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #ifndef CONFIG_SYS_RAMBOOT
 static void sdram_start (int hi_addr)
 {
@@ -82,12 +68,12 @@ static void sdram_start (int hi_addr)
 #endif
 
 /*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
  *            is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+int dram_init(void)
 {
        ulong dramsize = 0;
        uint svr, pvr;
@@ -166,7 +152,9 @@ phys_size_t initdram (int board_type)
                __asm__ volatile ("sync");
        }
 
-       return dramsize;
+       gd->ram_size = dramsize;
+
+       return 0;
 }
 
 int checkboard (void)
@@ -186,13 +174,14 @@ void pci_init_board(void)
 }
 #endif
 
-#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);
+
+       return 0;
 }
-#endif
+#endif /* CONFIG_OF_BOARD_SETUP */
 
 int board_eth_init(bd_t *bis)
 {
@@ -484,7 +473,7 @@ void show_boot_progress(int status)
        display_out_pos = 0;    /* reset output position */
 
        /* we want to flush status 15 now */
-       if (status == 15)
+       if (status == BOOTSTAGE_ID_RUN_OS)
                display_flush();
 }
 #endif