[U-Boot] i.mx6q: configs: Add fdt_high and initrd_high variables

Submitted by Dirk Behme on Jan. 13, 2012, 9:49 a.m.

Details

Message ID 1326448165-24041-2-git-send-email-dirk.behme@de.bosch.com
State Accepted
Commit 7e9603e74ef95a0900771d63ba499b3e80300e55
Delegated to: Stefano Babic
Headers show

Commit Message

Dirk Behme Jan. 13, 2012, 9:49 a.m.
To be able to load the device tree and initrd correctly, set
the fdt_high and initrd_high environment variables.

Using 0xffffffff implies that the device tree and the initrd
are initially copied to working addresses. This will avoid an
additional copy.

Loading the device tree to 0x30000000 and the initrd to 0x3c000000
should work for both boards, the ARM2 and SabreLite.

Example (SabreLite):

fatload mmc 0:2 0x10000000 uImage
fatload mmc 0:2 0x3c000000 uInitrd
fatload mmc 0:2 0x30000000 board.dtb
bootm 0x10000000 0x3c000000 0x30000000

Note: This requires that the kernel has CONFIG_HIGHMEM enabled.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Jason Liu <jason.hui@linaro.org>
CC: Stefano Babic <sbabic@denx.de>
---
Note: This patch is against the recent head of u-boot-imx.git including
      the SabreLite support:

      5b894e4d00ff94a221f8cc23d54d08b889f54190
      i.mx: i.mx6q: add the initial support for i.mx6q Sabre Lite board

Note: tools/checkpatch.pl reports 0 errors, 0 warnings

 include/configs/mx6qarm2.h      |    2 ++
 include/configs/mx6qsabrelite.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

Comments

Jason Liu Jan. 16, 2012, 1:45 p.m.
On Fri, Jan 13, 2012 at 5:49 PM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> To be able to load the device tree and initrd correctly, set
> the fdt_high and initrd_high environment variables.
>
> Using 0xffffffff implies that the device tree and the initrd
> are initially copied to working addresses. This will avoid an
> additional copy.
>
> Loading the device tree to 0x30000000 and the initrd to 0x3c000000
> should work for both boards, the ARM2 and SabreLite.
>
> Example (SabreLite):
>
> fatload mmc 0:2 0x10000000 uImage
> fatload mmc 0:2 0x3c000000 uInitrd
> fatload mmc 0:2 0x30000000 board.dtb
> bootm 0x10000000 0x3c000000 0x30000000
>
> Note: This requires that the kernel has CONFIG_HIGHMEM enabled.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> CC: Jason Liu <jason.hui@linaro.org>
> CC: Stefano Babic <sbabic@denx.de>
> ---
> Note: This patch is against the recent head of u-boot-imx.git including
>      the SabreLite support:
>
>      5b894e4d00ff94a221f8cc23d54d08b889f54190
>      i.mx: i.mx6q: add the initial support for i.mx6q Sabre Lite board
>
> Note: tools/checkpatch.pl reports 0 errors, 0 warnings
>

Acked-by: Jason Liu <jason.hui@linaro.org>

> 1.7.0.4
>
Stefano Babic Jan. 17, 2012, 9:45 a.m.
On 13/01/2012 10:49, Dirk Behme wrote:
> To be able to load the device tree and initrd correctly, set
> the fdt_high and initrd_high environment variables.
> 
> Using 0xffffffff implies that the device tree and the initrd
> are initially copied to working addresses. This will avoid an
> additional copy.
> 
> Loading the device tree to 0x30000000 and the initrd to 0x3c000000
> should work for both boards, the ARM2 and SabreLite.
> 
> Example (SabreLite):
> 
> fatload mmc 0:2 0x10000000 uImage
> fatload mmc 0:2 0x3c000000 uInitrd
> fatload mmc 0:2 0x30000000 board.dtb
> bootm 0x10000000 0x3c000000 0x30000000
> 
> Note: This requires that the kernel has CONFIG_HIGHMEM enabled.
> 
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> CC: Jason Liu <jason.hui@linaro.org>
> CC: Stefano Babic <sbabic@denx.de>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch hide | download patch | download mbox

diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h
index 124a7a6..0962d3c 100644
--- a/include/configs/mx6qarm2.h
+++ b/include/configs/mx6qarm2.h
@@ -86,6 +86,8 @@ 
 	"script=boot.scr\0" \
 	"uimage=uImage\0" \
 	"console=ttymxc3\0" \
+	"fdt_high=0xffffffff\0" \
+	"initrd_high=0xffffffff\0" \
 	"mmcdev=1\0" \
 	"mmcpart=2\0" \
 	"mmcroot=/dev/mmcblk0p3 rootwait rw\0" \
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index 464f0ec..ba09f15 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -78,6 +78,8 @@ 
        "script=boot.scr\0" \
        "uimage=uImage\0" \
        "console=ttymxc3\0" \
+	"fdt_high=0xffffffff\0"	  \
+	"initrd_high=0xffffffff\0" \
        "mmcdev=0\0" \
        "mmcpart=2\0" \
        "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \