platform/x86: intel_pmc_core: Make the driver PCH family agnostic
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Sat, 12 Aug 2017 16:50:09 +0000 (09:50 -0700)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 13 Aug 2017 13:01:22 +0000 (16:01 +0300)
commitc977b98bbef5898ed3d30b08ea67622e9e82082a
tree8c342d28d6f624c1c91c54c1f2b90b7ebd17687d
parent2cf7bdec2db81730610edb2631252b39375024a0
platform/x86: intel_pmc_core: Make the driver PCH family agnostic

Although this driver did pretty good job in abstracting PCH specific
interfaces, but still there are some loose ends. For example
SLP_S0 counter (for reading SLP_S0 residency), PM config offset (for
checking permissions to read XRAM) and PPFEAR offset (for reading IP
status) is still hardcoded for a specific family of PCH.

This change extended the struct pmc_reg_map to allow per family
configuration of offsets and bits.

No functional change is expected with this change. This change allows
seamless additions to new PCH and create a baseline for other platform
specific extensions.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_pmc_core.c
drivers/platform/x86/intel_pmc_core.h