]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
armv8/ls2085a: Expose all DDR region(s) to Linux
authorBhupesh Sharma <bhupesh.sharma at freescale.com>
Thu, 28 May 2015 09:24:10 +0000 (14:54 +0530)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:34:21 +0000 (13:34 +0200)
This patch allows u-boot to expose the complete DDR region(s) to Linux
(after subtracting the memory hidden via MEM_TOP_HIDE mechanism).

This allows the u-boot to support the 48-bit VA support provided by
ARM64 Linux in flavors 3.18 and above, by passing the appropriate
'memory' DTS nodes.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma at freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/ls2085a/README
board/freescale/ls2085a/ls2085a.c
board/freescale/ls2085aqds/README
board/freescale/ls2085aqds/ls2085aqds.c
board/freescale/ls2085ardb/README
board/freescale/ls2085ardb/ls2085ardb.c

index b7023e1d484ae4f9d26aa1f30e0ed643d711f4b5..bc1d0bb4a7061be3831e7b6920f5f7600a0c1193 100644 (file)
@@ -14,3 +14,14 @@ Memory map from core's view
 
 Other addresses are either reserved, or not used directly by u-boot.
 This list should be updated when more addresses are used.
+
+Booting Linux flavors which do not support 48-bit VA (< Linux 3.18)
+-------------------------------------------------------------------
+One needs to use appropriate bootargs to boot Linux flavors which do
+not support 48-bit VA (for e.g. < Linux 3.18) by appending mem=2048M, as shown
+below:
+
+=> setenv bootargs 'console=ttyS1,115200 root=/dev/ram
+   earlycon=uart8250,mmio,0x21c0600,115200 default_hugepagesz=2m hugepagesz=2m
+   hugepages=16 mem=2048M'
+
index dd0acf23b23a9d42138a71d266a5ad4a9e44b169..e43dd4c9af9442c79e66885c43b07a758b1e6bf9 100644 (file)
@@ -127,15 +127,18 @@ void fdt_fixup_board_enet(void *fdt)
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, bd_t *bd)
 {
-       phys_addr_t base;
-       phys_size_t size;
+       u64 base[CONFIG_NR_DRAM_BANKS];
+       u64 size[CONFIG_NR_DRAM_BANKS];
 
        ft_cpu_setup(blob, bd);
 
-       /* limit the memory size to bank 1 until Linux can handle 40-bit PA */
-       base = getenv_bootm_low();
-       size = getenv_bootm_size();
-       fdt_fixup_memory(blob, (u64)base, (u64)size);
+       /* fixup DT for the two GPP DDR banks */
+       base[0] = gd->bd->bi_dram[0].start;
+       size[0] = gd->bd->bi_dram[0].size;
+       base[1] = gd->bd->bi_dram[1].start;
+       size[1] = gd->bd->bi_dram[1].size;
+
+       fdt_fixup_memory_banks(blob, base, size, 2);
 
 #ifdef CONFIG_FSL_MC_ENET
        fdt_fixup_board_enet(blob);
index fb3938e673f8e66b5e7aec77a6b7bdc064bde267..11b2e79945f7c3db40b38a5bf3574932b37285d4 100644 (file)
@@ -127,3 +127,22 @@ b) NOR boot
 c) NAND boot
 d) SD boot
 e) QSPI boot
+
+Environment Variables
+---------------------
+- mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined
+  the value CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS will be assumed.
+
+- mcmemsize: MC DRAM block size. If this variable is not defined
+  the value CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed.
+
+Booting Linux flavors which do not support 48-bit VA (< Linux 3.18)
+-------------------------------------------------------------------
+One needs to use appropriate bootargs to boot Linux flavors which do
+not support 48-bit VA (for e.g. < Linux 3.18) by appending mem=2048M, as shown
+below:
+
+=> setenv bootargs 'console=ttyS1,115200 root=/dev/ram
+   earlycon=uart8250,mmio,0x21c0600,115200 default_hugepagesz=2m hugepagesz=2m
+   hugepages=16 mem=2048M'
+
index 27a23ec75180166eba7f4d8626455f7e0dfd155a..9b57799f91a12ad3a45a2a128e4a0b41f4930b48 100644 (file)
@@ -244,15 +244,18 @@ void fdt_fixup_board_enet(void *fdt)
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, bd_t *bd)
 {
-       phys_addr_t base;
-       phys_size_t size;
+       u64 base[CONFIG_NR_DRAM_BANKS];
+       u64 size[CONFIG_NR_DRAM_BANKS];
 
        ft_cpu_setup(blob, bd);
 
-       /* limit the memory size to bank 1 until Linux can handle 40-bit PA */
-       base = getenv_bootm_low();
-       size = getenv_bootm_size();
-       fdt_fixup_memory(blob, (u64)base, (u64)size);
+       /* fixup DT for the two GPP DDR banks */
+       base[0] = gd->bd->bi_dram[0].start;
+       size[0] = gd->bd->bi_dram[0].size;
+       base[1] = gd->bd->bi_dram[1].start;
+       size[1] = gd->bd->bi_dram[1].size;
+
+       fdt_fixup_memory_banks(blob, base, size, 2);
 
 #ifdef CONFIG_FSL_MC_ENET
        fdt_fixup_board_enet(blob);
index cfd5185f463c03bd4bfd4429a18cc96b5eea0a0a..2f18243a8b2dbb8d11846d84802e3ed808a39698 100644 (file)
@@ -107,3 +107,14 @@ Booting Options
 ---------------
 a) NOR boot
 b) NAND boot
+
+Booting Linux flavors which do not support 48-bit VA (< Linux 3.18)
+-------------------------------------------------------------------
+One needs to use appropriate bootargs to boot Linux flavors which do
+not support 48-bit VA (for e.g. < Linux 3.18) by appending mem=2048M, as shown
+below:
+
+=> setenv bootargs 'console=ttyS1,115200 root=/dev/ram
+   earlycon=uart8250,mmio,0x21c0600,115200 default_hugepagesz=2m hugepagesz=2m
+   hugepages=16 mem=2048M'
+
index abe2114e1739573b2db928f28e25428f2ccd27f1..15cb25167cdf5d61cf5682a2b691df806a017527 100644 (file)
@@ -241,15 +241,18 @@ void fdt_fixup_board_enet(void *fdt)
 #ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, bd_t *bd)
 {
-       phys_addr_t base;
-       phys_size_t size;
+       u64 base[CONFIG_NR_DRAM_BANKS];
+       u64 size[CONFIG_NR_DRAM_BANKS];
 
        ft_cpu_setup(blob, bd);
 
-       /* limit the memory size to bank 1 until Linux can handle 40-bit PA */
-       base = getenv_bootm_low();
-       size = getenv_bootm_size();
-       fdt_fixup_memory(blob, (u64)base, (u64)size);
+       /* fixup DT for the two GPP DDR banks */
+       base[0] = gd->bd->bi_dram[0].start;
+       size[0] = gd->bd->bi_dram[0].size;
+       base[1] = gd->bd->bi_dram[1].start;
+       size[1] = gd->bd->bi_dram[1].size;
+
+       fdt_fixup_memory_banks(blob, base, size, 2);
 
 #ifdef CONFIG_FSL_MC_ENET
        fdt_fixup_board_enet(blob);