]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/ti/omap5912osk/omap5912osk.c
pcm051: use ti_am335x_common.h config
[karo-tx-uboot.git] / board / ti / omap5912osk / omap5912osk.c
index 6993b136eebbf10cfdf1c678958ab4b6d3162577..88a7310cec6de5780856e95609fec19bbae6ba8b 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>
+#include <netdev.h>
 #if defined(CONFIG_OMAP1610)
 #include <./configs/omap1510.h>
 #endif
@@ -65,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 ();
@@ -74,17 +67,6 @@ int board_init (void)
  *  ... rkw ...
  */
        icache_enable ();
-
-       flash__init ();
-       ether__init ();
-       return 0;
-}
-
-
-int misc_init_r (void)
-{
-       /* currently empty */
-       return (0);
 }
 
 /******************************
@@ -134,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
@@ -294,15 +281,27 @@ void peripheral_power_enable (void)
  */
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        puts("Board: OSK5912");
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');
 
        return (0);
 }
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_LAN91C96
+       rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);
+#endif
+       return rc;
+}
+#endif