]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/amd/pmc: Isolate STB code changes to a new file
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Fri, 8 Nov 2024 07:08:17 +0000 (12:38 +0530)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 2 Dec 2024 17:31:44 +0000 (19:31 +0200)
commit3279f7a6b7d42374897d3b818630602f0ff56521
treeee0d15ca20ae36c9c7e08780ab82ad67bdb6bddb
parent2851f4f8ed4e130d864c5478c6da933a4427ae52
platform/x86/amd/pmc: Isolate STB code changes to a new file

Since S2D (Spill to DRAM) uses different message port offsets compared to
PMC message offsets for communication with PMFW, relocate the S2D macros
from pmc.c to a new file, mp1_stb.c, for better code organization.

Following this change, it is logical to introduce a new structure,
"struct stb_arg," to pass the message, argument, and response offset
details to PMFW via the amd_pmc_send_cmd() call. Additionally, move the
s2d_msg_id member from amd_pmc_dev into the new structure.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20241108070822.3912689-6-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/pmc/mp1_stb.c
drivers/platform/x86/amd/pmc/pmc.c
drivers/platform/x86/amd/pmc/pmc.h