platform/x86: ISST: Parse SST MMIO and update instance
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 8 Mar 2023 07:06:37 +0000 (23:06 -0800)
committerHans de Goede <hdegoede@redhat.com>
Thu, 16 Mar 2023 14:18:02 +0000 (15:18 +0100)
commit0ab147bb840fca2bc3bca88f320b34c5b5cc013c
treed241f5ff16cbe9f2a5cc3fb10c94dc92f46f8a7c
parentd805456c712f93ba8a012430f2a93bec133b6ff4
platform/x86: ISST: Parse SST MMIO and update instance

SST registers are presented to OS in multi-layer structures starting
with a SST header showing version information freezing current
definition.

For details on SST terminology refer to
Documentation/admin-guide/pm/intel-speed-select.rst
under the kernel documentation

SST TPMI details are published in the following document:
https://github.com/intel/tpmi_power_management/blob/main/SST_TPMI_public_disclosure_FINAL.docx

SST MMIO structure layout follows:
SST-HEADER
SST-CP Header
SST-CP CONTROL
SST-CP STATUS
SST-CP CONFIG0
SST-CP CONFIG1
...
...
SST-PP Header
SST-PP OFFSET_0
SST-PP OFFSET_1
SST_PP_0_INFO
SST_PP_1_INFO
SST_PP_2_INFO
SST_PP_3_INFO
SST-PP CONTROL
SST-PP STATUS

Each register bank contains information to get to next lower level
information. This information is parsed and stored in the struct
tpmi_per_power_domain_info for each domain. This information is
used to process each SST requests.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Pragya Tanwar <pragya.tanwar@intel.com>
Link: https://lore.kernel.org/r/20230308070642.1727167-4-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c