platform/x86/amd/hsmp: Create separate ACPI, plat and common drivers
authorSuma Hegde <suma.hegde@amd.com>
Mon, 21 Oct 2024 11:14:25 +0000 (11:14 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 25 Oct 2024 14:28:20 +0000 (17:28 +0300)
commit7d3135d16356f1f0adda7e76d4a747f618263db4
tree1c0e88da905a85c8b3e500aad35471f1892a74d8
parent8e75dff56e003cdd38643024c4f5f8ba227100c8
platform/x86/amd/hsmp: Create separate ACPI, plat and common drivers

Separate the probes for HSMP ACPI and platform device drivers.

Provide a Kconfig option to choose between ACPI or the platform device
based driver. The common code which is the core part of the HSMP driver
maintained at hsmp.c is guarded by AMD_HSMP config and is selected by
these two driver configs. This will be built into separate hsmp_common.ko
module and acpi as hsmp_acpi and plat as amd_hsmp respectively.

Also add "|| COMPILE_TEST" clause in Kconfig to get build coverage for
HSMP.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Link: https://lore.kernel.org/r/20241021111428.2676884-8-suma.hegde@amd.com
[ij: Fixed doc to use pre-formatted text for the ACPI dump.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Documentation/arch/x86/amd_hsmp.rst
drivers/platform/x86/amd/Makefile
drivers/platform/x86/amd/hsmp/Kconfig
drivers/platform/x86/amd/hsmp/Makefile
drivers/platform/x86/amd/hsmp/acpi.c
drivers/platform/x86/amd/hsmp/hsmp.c
drivers/platform/x86/amd/hsmp/hsmp.h
drivers/platform/x86/amd/hsmp/plat.c