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

As the SoC evolves with each generation, the dynamics between the PMC and
STB layers within the PMC driver are becoming increasingly complex, making
it challenging to manage both in a single file and maintain code
readability.

Additionally, during silicon bringup, the PMC functionality is often
enabled first, with STB functionality added later. This can lead to missed
updates in the driver, potentially causing issues.

To address these challenges, it's beneficial to move all STB-related
changes to a separate file. This approach will better accommodate newer
SoCs, provide improved flexibility for desktop variants, and facilitate
the collection of additional debug information through STB mechanisms.

Also the additional checks for entering s2d_init have been moved from
the PMC probe to amd_pmc_s2d_init(). This adjustment makes more sense
following the transfer of code to the separate mp1_stb.c file.

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-3-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/Makefile
drivers/platform/x86/amd/pmc/mp1_stb.c [new file with mode: 0644]
drivers/platform/x86/amd/pmc/pmc.c
drivers/platform/x86/amd/pmc/pmc.h