arm64: booti: allow to place kernel image anywhere in physical memory
[oweals/u-boot.git] / board / esd / pmc440 / cmd_pmc440.c
index e9a78a303ca9797624ea531db49261b759d5ce4c..b7cd595362c3c25f7f26b9c43e579ea30fd0acc6 100644 (file)
@@ -2,27 +2,11 @@
  * (C) Copyright 2007-2008
  * Matthias Fuchs, esd Gmbh, matthias.fuchs@esd-electronics.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 <command.h>
+#include <console.h>
 #include <asm/io.h>
 #include <asm/cache.h>
 #include <asm/processor.h>
@@ -364,16 +348,16 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                return 1;
        }
 
-       base = gd->bd->bi_memsize;
+       base = (u32)gd->ram_size;
 #if defined(CONFIG_LOGBUFFER)
        base -= LOGBUFF_LEN + LOGBUFF_OVERHEAD;
 #endif
        /*
-        * gd->bd->bi_memsize == physical ram size - CONFIG_SYS_MEM_TOP_HIDE
+        * gd->ram_size == physical ram size - CONFIG_SYS_MEM_TOP_HIDE
         */
        param = base - (pram << 10);
        printf("PARAM: @%08x\n", param);
-       debug("memsize=0x%08x, base=0x%08x\n", (u32)gd->bd->bi_memsize, base);
+       debug("memsize=0x%08x, base=0x%08x\n", (u32)gd->ram_size, base);
 
        /* clear entire PA ram */
        memset((void*)param, 0, (pram << 10));