platform/x86: intel_pmc_core: Refactor the driver by removing redundant code
authorGayatri Kammela <gayatri.kammela@intel.com>
Tue, 4 Feb 2020 23:01:56 +0000 (15:01 -0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 Feb 2020 15:47:38 +0000 (17:47 +0200)
commit4d6a63e0b99ea4ba7f718ab084ebf566b7d1585f
tree845d4e096dfbf763919127a71eb8ffe3d23d9801
parentf632817d5ef369a6f433449a1b8fa26627fc40e0
platform/x86: intel_pmc_core: Refactor the driver by removing redundant code

pmc_core_slps0_dbg_show() is responsible for displaying debug registers
through slp_s0_debug_status entry. The driver uses the same but
redundant code to dump these debug registers for an S0ix failure.

Hence, refactor the driver by removing redundant code and reuse the
same function that both dumps registers through slp_s0_debug_status
entry and in resume for an S0ix failure.

The changes in this patch are preparatory, so platforms that support low
power sub-states can dump the debug registers when the attempt to enter
low power states are unsuccessful.

Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David Box <david.e.box@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_pmc_core.c