From c42ff090e41d4b9e50faa727bac490ee790f82f4 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Wed, 11 Jun 2014 23:12:28 +0200 Subject: tegra20: display: fix checking of return value The calling code seems a bit in doubt about the return value of fdtdec_lookup_phandle. Since it returns a negative value on error (and fdt_node_offset_by_phandle as well), check for that. cc: Wei Ni Signed-off-by: Jeroen Hofstee Tested-by: Stephen Warren Signed-off-by: Tom Warren --- arch/arm/cpu/armv7/tegra20/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/tegra20/display.c b/arch/arm/cpu/armv7/tegra20/display.c index 488f0c639d..fd77f3f0ef 100644 --- a/arch/arm/cpu/armv7/tegra20/display.c +++ b/arch/arm/cpu/armv7/tegra20/display.c @@ -328,7 +328,7 @@ static int tegra_display_decode_config(const void *blob, rgb = fdt_subnode_offset(blob, node, "rgb"); config->panel_node = fdtdec_lookup_phandle(blob, rgb, "nvidia,panel"); - if (!config->panel_node < 0) { + if (config->panel_node < 0) { debug("%s: Cannot find panel information\n", __func__); return -1; } -- cgit From 99dd16c60c33e87bff4da02f8d9077841c45d5f9 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Wed, 11 Jun 2014 21:53:13 +0200 Subject: ARM: tegra: fix include guard cc: Stephen Warren Signed-off-by: Jeroen Hofstee Acked-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra-common-ums.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/tegra-common-ums.h b/include/configs/tegra-common-ums.h index 7bd8960a32..578ca68b57 100644 --- a/include/configs/tegra-common-ums.h +++ b/include/configs/tegra-common-ums.h @@ -6,7 +6,7 @@ */ #ifndef _TEGRA_COMMON_UMS_H_ -#define _TEGRA_COMMON_UMS_H +#define _TEGRA_COMMON_UMS_H_ #ifndef CONFIG_SPL_BUILD /* USB gadget, and mass storage protocol */ -- cgit From 72638b02f4c380879b0f90b67bcb8d1081dd2eab Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 19 Jun 2014 10:52:58 -0600 Subject: ARM: tegra: fix extlinux.conf search location extlinux.conf is stored in /boot/extlinux/extlinux.conf rather than /boot/extlinux.conf. Adjust Tegra's default boot scripts to use the correct location. This change aligns Tegra's boot scripts with rpi_b.h and also the location that the Fedora installer actually puts the file. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra-common-post.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 76dad4e88c..8cfc17a93c 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -101,13 +101,12 @@ \ "do_sysboot_boot=" \ "sysboot ${devtype} ${devnum}:${rootpart} any " \ - "${scriptaddr} ${prefix}extlinux.conf\0" \ + "${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \ \ "sysboot_boot=" \ "if test -e ${devtype} ${devnum}:${rootpart} " \ - "${prefix}extlinux.conf; then " \ - "echo Found extlinux config " \ - "${prefix}extlinux.conf; " \ + "${prefix}extlinux/extlinux.conf; then " \ + "echo Found ${prefix}extlinux/extlinux.conf; " \ "run do_sysboot_boot; " \ "echo SCRIPT FAILED: continuing...; " \ "fi\0" \ -- cgit From fe7b7cd26683b29bed407bf5ab778e8d80201d73 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 19 Jun 2014 10:52:59 -0600 Subject: ARM: tegra: set initrd_high so boot scripts work During bootm/z, U-Boot relocates the DTB and initrd to high memory so they are out of the way of the kernel. On ARM at least, some parts of high memory are "highmem" and can't be accessed at early boot. To solve this, we need to restrict this relocation process to use lower parts of RAM that area accessible. For the DTB, an earlier patch of mine set CONFIG_SYS_BOOTMAPSZ. However, since some platforms have different restrictions on DTB and initrd location, that config option doesn't affect the initrd. We need to set the initrd_high environment variable to control the initrd relocation. Since we have carefully chosen the load addresses for the DTB and initrd (see comments in include/configs/tegraNNN-common.h re: values in MEM_LAYOUT_ENV_SETTINGS), we don't actually need any DTB or initrd relocation at all. Skipping relocation removes some redundant work. Hence, set both fdt_high and initrd_high to ffffffff which completely disables relocation. If the user does something unusual, such as using custom locations for the DTB/initrd load address or wanting to use DTB/initrd relocation for some reason, they can simply set these variables to custom values to override these environment defaults. With this change, cmd_sysboot works correctly for a filesystem created by the Fedora installer. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra-common-post.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 8cfc17a93c..1c770c90fe 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -173,6 +173,8 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ TEGRA_DEVICE_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ + "fdt_high=ffffffff\0" \ + "initrd_high=ffffffff\0" \ BOOTCMDS_COMMON \ BOARD_EXTRA_ENV_SETTINGS -- cgit