]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm64: tegra: add DTB build time for t210
authorDaniel Fu <danifu@nvidia.com>
Tue, 21 Oct 2014 13:28:39 +0000 (06:28 -0700)
committerLaxman Dewangan <ldewangan@nvidia.com>
Fri, 24 Oct 2014 08:03:12 +0000 (01:03 -0700)
Add DTB build time for OTA verification.

Bug 1561893

Change-Id: I9674e20819378f027c354f96872cf34702155048
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/559909
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
arch/arm64/boot/dts/tegra210.dtsi
drivers/platform/tegra/common.c

index 20324d4bf3cbd2fe64569fd72a2c84eb910fd8b3..93a149a79230867ade8316f5a54c85b950dcdb8e 100644 (file)
@@ -28,6 +28,7 @@
 / {
        compatible = "nvidia,tegra210";
        interrupt-parent = <&intc>;
+       nvidia,dtbbuildtime = __DATE__, __TIME__;
        #address-cells = <2>;
        #size-cells = <2>;
 
index b86d96af00fb28714bf44d776c72f1010c9fdc43..f982b710dae7ca9b78f5fe6c7cd0cdcf47e11bcc 100644 (file)
@@ -2449,9 +2449,12 @@ early_param("tegra_split_mem", set_tegra_split_mem);
 
 void __init display_tegra_dt_info(void)
 {
+       int ret_d;
+       int ret_t;
        unsigned long dt_root;
        const char *dts_fname;
-
+       const char *dtb_bdate;
+       const char *dtb_btime;
 
        dt_root = of_get_flat_dt_root();
 
@@ -2460,6 +2463,15 @@ void __init display_tegra_dt_info(void)
                pr_info("DTS File Name: %s\n", dts_fname);
        else
                pr_info("DTS File Name: <unknown>\n");
+
+       ret_d = of_property_read_string_index(of_find_node_by_path("/"),
+                       "nvidia,dtbbuildtime", 0, &dtb_bdate);
+       ret_t = of_property_read_string_index(of_find_node_by_path("/"),
+                       "nvidia,dtbbuildtime", 1, &dtb_btime);
+       if (!ret_d && !ret_t)
+               pr_info("DTB Build time: %s %s\n", dtb_bdate, dtb_btime);
+       else
+               pr_info("DTB Build time: <unknown>\n");
 }
 
 static void tegra_get_bl_reset_status(void)