Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
[platform/kernel/u-boot.git] / board / ti / omap5912osk / omap5912osk.c
index fac683a..e402649 100644 (file)
  * Texas Instruments, <www.ti.com>
  * Rishi Bhattacharya <rishi@ti.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>
@@ -66,6 +50,14 @@ int board_init (void)
        /* adress of boot parameters */
        gd->bd->bi_boot_params = 0x10000100;
 
+       flash__init();
+       ether__init();
+
+       return 0;
+}
+
+void s_init(void)
+{
        /* Configure MUX settings */
        set_muxconf_regs ();
        peripheral_power_enable ();
@@ -75,10 +67,6 @@ int board_init (void)
  *  ... rkw ...
  */
        icache_enable ();
-
-       flash__init ();
-       ether__init ();
-       return 0;
 }
 
 /******************************
@@ -128,14 +116,19 @@ void ether__init (void)
  Routine:
  Description:
 ******************************/
-int dram_init (void)
+int dram_init(void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+       gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
 
        return 0;
 }
 
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
 /******************************************************
  Routine: set_muxconf_regs
  Description: Setting up the configuration Mux registers