diff options
author | Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | 2023-12-28 13:21:01 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2024-01-02 15:40:24 +0300 |
commit | 13313c135266ed62d33f43281fb22289865064fd (patch) | |
tree | cf376924ecb4e5c0bec75d7ac7b37692e132fd4d /drivers/platform/x86 | |
parent | d8fb50fe6c5c3632079a1642afdd87d30e0d1bbe (diff) | |
download | linux-13313c135266ed62d33f43281fb22289865064fd.tar.xz |
platform/x86/amd/pmc: call amd_pmc_get_ip_info() during driver probe
In the current code, amd_pmc_get_ip_info() is being called from
amd_pmc_s2d_init() and that code block gets enabled only when the STB is
being enabled.
But the information from amd_pmc_get_ip_info() will be required outside of
STB usecase. Hence move this call into driver probe sequence.
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231228102104.1785383-4-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/amd/pmc/pmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index 6826e26a7650..bc52229b155e 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -973,9 +973,6 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev) /* Spill to DRAM feature uses separate SMU message port */ dev->msg_port = 1; - /* Get num of IP blocks within the SoC */ - amd_pmc_get_ip_info(dev); - amd_pmc_send_cmd(dev, S2D_TELEMETRY_SIZE, &size, dev->s2d_msg_id, true); if (size != S2D_TELEMETRY_BYTES_MAX) return -EIO; @@ -1083,6 +1080,9 @@ static int amd_pmc_probe(struct platform_device *pdev) mutex_init(&dev->lock); + /* Get num of IP blocks within the SoC */ + amd_pmc_get_ip_info(dev); + if (enable_stb && amd_pmc_is_stb_supported(dev)) { err = amd_pmc_s2d_init(dev); if (err) |