]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mx31pdk: Use the new relocation scheme
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 9 Feb 2011 01:17:55 +0000 (01:17 +0000)
committerAlbert Aribaud <albert.aribaud@free.fr>
Mon, 21 Feb 2011 07:30:54 +0000 (08:30 +0100)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
board/freescale/mx31pdk/mx31pdk.c
include/configs/mx31pdk.h
nand_spl/board/freescale/mx31pdk/u-boot.lds

index 9f471692dd9f695dec5ac6b7d9abb7a100e8cf3d..2756e5acd53787c54d4e2c4e8522e767a6cdf358 100644 (file)
 DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
+{
+       /* dram_init must store complete ramsize in gd->ram_size */
+       gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
+                               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;
-
-       return 0;
 }
 
 int board_init(void)
index 3b90a01623933b9995d229ebdb6667f60e310e36..d7286c04bee281c0fc4df5bd064b0c41b59d4d9f 100644 (file)
 #define PHYS_SDRAM_1           CSD0_BASE
 #define PHYS_SDRAM_1_SIZE      (128 * 1024 * 1024)
 
+#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)
+
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
  */
index edd843089b0f79bb42d47c215157ea3ada2d433e..ff289fb3c6fde94eea675d53c68669191645cc2c 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * (C) Copyright 2009
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * 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
+ */
 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
 OUTPUT_ARCH(arm)
 ENTRY(_start)
@@ -19,18 +41,41 @@ SECTIONS
        .rodata : { *(.rodata) }
 
        . = ALIGN(4);
-       .data : { *(.data) }
+       .data : {
+               *(.data)
+       }
 
        . = ALIGN(4);
-       .got : { *(.got) }
-
-       . = .;
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
        __u_boot_cmd_end = .;
 
        . = ALIGN(4);
-       __bss_start = .;
-       .bss : { *(.bss) }
-       _end = .;
+
+       .rel.dyn : {
+               __rel_dyn_start = .;
+               *(.rel*)
+               __rel_dyn_end = .;
+       }
+
+       .dynsym : {
+               __dynsym_start = .;
+               *(.dynsym)
+       }
+
+       .bss __rel_dyn_start (OVERLAY) : {
+               __bss_start = .;
+               *(.bss)
+                . = ALIGN(4);
+               _end = .;
+       }
+
+       /DISCARD/ : { *(.bss*) }
+       /DISCARD/ : { *(.dynstr*) }
+       /DISCARD/ : { *(.dynsym*) }
+       /DISCARD/ : { *(.dynamic*) }
+       /DISCARD/ : { *(.hash*) }
+       /DISCARD/ : { *(.plt*) }
+       /DISCARD/ : { *(.interp*) }
+       /DISCARD/ : { *(.gnu*) }
 }