]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/syteco/jadecpu/jadecpu.c
Merge branch 'u-boot/master' into u-boot-arm/master
[karo-tx-uboot.git] / board / syteco / jadecpu / jadecpu.c
index 04d2f9d5a66539f500c499d7064c7fdb82298a6e..6c60a41e3dc5d9ae1266515118534969a2aeaf0b 100644 (file)
@@ -5,20 +5,7 @@
  * (C) Copyright 2007, mycable GmbH
  * Carsten Schneider <cs@mycable.de>, Alexander Bigga <ab@mycable.de>
  *
- * 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>
@@ -40,10 +27,10 @@ int board_init(void)
        writel(0x00000010, &ccnt->cmux_md);
 
        gd->flags = 0;
-       gd->bd->bi_arch_number = MACH_TYPE_JADECPU;
        gd->bd->bi_boot_params = PHYS_SDRAM + PHYS_SDRAM_SIZE - 0x10000;
 
        icache_enable();
+       dcache_enable();
 
        return 0;
 }
@@ -125,9 +112,6 @@ int board_late_init(void)
                setenv("preboot", "run gs_slow_boot");
        } else if ((in_word & 0xC0) != 0) {
                setenv("stdout", "vga");
-               setenv("gs_bootcmd", "mw.l 0x40000000 0 1024; usb start;"
-                       "fatls usb 0; fatload usb 0 0x40000000 mcq5resq.bin;"
-                       "bootelf 0x40000000; bootelf 0x10080000");
                setenv("preboot", "run gs_slow_boot");
        } else {
                setenv("stdin", "serial");
@@ -136,7 +120,6 @@ int board_late_init(void)
                if (getenv("gs_devel")) {
                        setenv("preboot", "run gs_slow_boot");
                } else {
-                       setenv("gs_bootcmd", "bootelf 0x10080000");
                        setenv("preboot", "run gs_fast_boot");
                }
        }
@@ -154,12 +137,19 @@ int misc_init_r(void)
  */
 int dram_init(void)
 {
-       gd->bd->bi_dram[0].start = PHYS_SDRAM;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+       /* dram_init must store complete ramsize in gd->ram_size */
+       gd->ram_size = get_ram_size((void *)PHYS_SDRAM,
+                                       PHYS_SDRAM_SIZE);
 
        return 0;
 }
 
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM;
+       gd->bd->bi_dram[0].size = gd->ram_size;
+}
+
 int board_eth_init(bd_t *bis)
 {
        int rc = 0;