exynos: Remove unneeded device tree control #ifdefs
[oweals/u-boot.git] / board / armltd / versatile / versatile.c
index 197bc896ac26db3dd2ae8ea46b61a323014705d3..4e2d3421d8b13640c2d26246a4fa654e07660a3a 100644 (file)
  * ARM Ltd.
  * Philippe Robin, <philippe.robin@arm.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 <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -50,7 +35,7 @@ void show_boot_progress(int progress)
  * Miscellaneous platform dependent initialisations
  */
 
-int board_init (void)
+int board_early_init_f (void)
 {
        /*
         * set clock frequency:
@@ -61,8 +46,17 @@ int board_init (void)
          ((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) |
           (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel));
 
+       return 0;
+}
+
+int board_init (void)
+{
        /* arch number of Versatile Board */
+#ifdef CONFIG_ARCH_VERSATILE_AB
+       gd->bd->bi_arch_number = MACH_TYPE_VERSATILE_AB;
+#else
        gd->bd->bi_arch_number = MACH_TYPE_VERSATILE_PB;
+#endif
 
        /* adress of boot parameters */
        gd->bd->bi_boot_params = 0x00000100;
@@ -87,5 +81,19 @@ int misc_init_r (void)
 ******************************/
 int dram_init (void)
 {
+       /* dram_init must store complete ramsize in gd->ram_size */
+       gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+                               PHYS_SDRAM_1_SIZE);
        return 0;
 }
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_SMC91111
+       rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
+#endif
+       return rc;
+}
+#endif