Skip to content
Snippets Groups Projects
Commit 86c2dccd authored by Ritesh Harjani's avatar Ritesh Harjani Committed by Gerrit - the friendly Code Review server
Browse files

lrdp-v2: mmcdoctor: Fix this parser in case of MMC_CLK_GATING=n


In case if clk_gating is disabled, few mmc_host fields
may not be valid. Hence fix the script in case if
mmc clk-gating is disabled.

Change-Id: Icc12d03efe980823e8d8d61a65097f47ae34961b
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent e67eab2b
No related branches found
No related tags found
No related merge requests found
......@@ -222,12 +222,15 @@ class MmcHostInfo():
def __init__(self, ramdump, mmc_host):
self.ramdump = ramdump
self.host = mmc_host
self.clk_gated = self.ramdump.read_bool(self.host +
self.ramdump.field_offset('struct mmc_host', 'clk_gated'))
self.clk_requests = self.ramdump.read_int(self.host +
self.ramdump.field_offset('struct mmc_host', 'clk_requests'))
self.clk_old = self.ramdump.read_int(self.host +
self.ramdump.field_offset('struct mmc_host', 'clk_old'))
if (self.ramdump.field_offset('struct mmc_host', 'clk_gated')):
self.clk_gated = self.ramdump.read_bool(self.host +
self.ramdump.field_offset('struct mmc_host', 'clk_gated'))
self.clk_requests = self.ramdump.read_int(self.host +
self.ramdump.field_offset('struct mmc_host', 'clk_requests'))
self.clk_old = self.ramdump.read_int(self.host +
self.ramdump.field_offset('struct mmc_host', 'clk_old'))
else:
self.clk_gated = self.clk_requests = self.clk_old = -23
offset = self.ramdump.field_offset('struct mmc_host', 'err_occurred')
if (offset):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment