board_f: Rename initdram() to dram_init()
[oweals/u-boot.git] / board / xes / xpedite1000 / xpedite1000.c
index a3534d2d7abfab522216fc0e466a71b68d2e0e02..ef646fa4a13e61224151bde469c4ce2a49d32f17 100644 (file)
@@ -1,26 +1,11 @@
 /*
  * Copyright (C) 2003 Travis B. Sawyer <travis.sawyer@sandburst.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>
+#include <console.h>
 #include <asm/processor.h>
 #include <spd_sdram.h>
 #include <i2c.h>
@@ -112,27 +97,30 @@ int board_early_init_f(void)
 
 int checkboard(void)
 {
-       char *s;
+       char buf[64];
+       int i;
 
        printf("Board: X-ES %s PMC SBC\n", CONFIG_SYS_BOARD_NAME);
        printf("       ");
-       s = getenv("board_rev");
-       if (s)
-               printf("Rev %s, ", s);
-       s = getenv("serial#");
-       if (s)
-               printf("Serial# %s, ", s);
-       s = getenv("board_cfg");
-       if (s)
-               printf("Cfg %s", s);
+       i = getenv_f("board_rev", buf, sizeof(buf));
+       if (i > 0)
+               printf("Rev %s, ", buf);
+       i = getenv_f("serial#", buf, sizeof(buf));
+       if (i > 0)
+               printf("Serial# %s, ", buf);
+       i = getenv_f("board_cfg", buf, sizeof(buf));
+       if (i > 0)
+               printf("Cfg %s", buf);
        printf("\n");
 
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+int dram_init(void)
 {
-       return spd_sdram();
+       gd->ram_size = spd_sdram();
+
+       return 0;
 }
 
 /*