platform/x86/amd/hsmp: Move hsmp_test to probe
authorSuma Hegde <suma.hegde@amd.com>
Sat, 6 Jan 2024 02:25:22 +0000 (02:25 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 25 Jan 2024 12:51:05 +0000 (14:51 +0200)
commite6100ef3c0bf52e801d08d247cea93cfa73a0d31
treed3f2334081a62132ba6e456749efc1f31747a7ff
parent3f399b5d7189bcb608c75abc85fe39f7a5509cfa
platform/x86/amd/hsmp: Move hsmp_test to probe

This is in advance to supporting ACPI based probe.

In case of non-ACPI driver, hsmp_test() can be
performed either in plat init() or in probe().

however, in case of ACPI probing, hsmp_test() cannot
be called in init(), as the mailbox reg offsets and
base addresses are read from ACPI table in the probe().

Hence, move hsmp_test() to probe as preparation for
ACPI support.

Also use hsmp_send_message() directly in hsmp_test()
as the semaphore is already initialized in probe.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240106022532.1746932-1-suma.hegde@amd.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/hsmp.c