From 3e2334524ca8346bb28cd54c7efbdddedad053b0 Mon Sep 17 00:00:00 2001
From: wadesong <wadesong@codeaurora.org>
Date: Wed, 27 Dec 2017 14:02:42 +0800
Subject: [PATCH] lrdp-v2: Refine MSM clock availability checking

LRDP-v2 is currently using the kernel version to judge if MSM
common clock is available on a system, which is inaccurate on
MSM8996_AU platform.

Change the clock dumping code to use the availability of macro
CONFIG_COMMON_CLK_MSM to judge if MSM common clock is used on
a platform.

Change-Id: Ic12ef5a249fb8b7c0f9633a6c8b9cdb23d0d39b4
---
 linux-ramdump-parser-v2/parsers/clockdump.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-ramdump-parser-v2/parsers/clockdump.py b/linux-ramdump-parser-v2/parsers/clockdump.py
index d9d04ea..0891f00 100644
--- a/linux-ramdump-parser-v2/parsers/clockdump.py
+++ b/linux-ramdump-parser-v2/parsers/clockdump.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015,2017 The Linux Foundation. All rights reserved.
+# Copyright (c) 2015,2017-2018 The Linux Foundation. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 and
@@ -267,7 +267,7 @@ class ClockDumps(RamParser):
                                     'struct of_clk_provider', 'data')
         data = self.ramdump.read_word(data_address, True)
 
-        if (self.ramdump.kernel_version < (4, 4, 38)):
+        if (self.ramdump.is_config_defined('CONFIG_COMMON_CLK_MSM')):
             self.print_clk_of_msm_provider_data(data)
         else:
             self.print_clk_onecell_data(data)
-- 
GitLab