arm: tegra: fix secure firmware check during boot
Bibek Basu [Tue, 21 Jul 2015 07:17:37 +0000 (12:17 +0530)]
psci status node should also be checked along with
compatible node to enable secure fimrware

Bug 200124907

Change-Id: Ieb336bc7d1cc2c68d94157222770a6da6a8dcfd1
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/772755
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

arch/arm/boot/dts/tegra124-jetson_tk1-pm375-000-c00-00.dts
arch/arm/mach-tegra/common.c

index 1303184..d6a25eb 100644 (file)
                bootargs = "tegraid=40.0.0.00.00 vmalloc=256M video=tegrafb console=ttyS0,115200n8 earlyprintk";
        };
 
+       psci {
+               status = "disabled";
+       };
+
        pinmux {
                pinctrl-names = "default", "drive", "unused", "suspend";
                pinctrl-3 = <&pinmux_suspend>;
index 542e2b6..23ae029 100644 (file)
@@ -1036,7 +1036,10 @@ void __init tegra11x_init_early(void)
 #ifdef CONFIG_ARCH_TEGRA_12x_SOC
 void __init tegra12x_init_early(void)
 {
-       if (of_find_compatible_node(NULL, NULL, "arm,psci"))
+       struct device_node *np =
+               of_find_compatible_node(NULL, NULL, "arm,psci");
+
+       if (np && of_device_is_available(np))
                tegra_with_secure_firmware = 1;
 
        display_tegra_dt_info();