Commit 642dd26f authored by David E. Box's avatar David E. Box Committed by Hans de Goede

platform/x86/intel/pmc/mtl: Use return value from pmc_core_ssram_init()

Instead of checking for a NULL regbase, use the return value from
pmc_core_ssram_init() to check if PMC discovery was successful. If not, use
the legacy enumeration method (which only works for the primary PMC).
Signed-off-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129222132.2331261-15-david.e.box@linux.intel.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent a01486dc
...@@ -990,12 +990,16 @@ int mtl_core_init(struct pmc_dev *pmcdev) ...@@ -990,12 +990,16 @@ int mtl_core_init(struct pmc_dev *pmcdev)
mtl_d3_fixup(); mtl_d3_fixup();
pmcdev->resume = mtl_resume; pmcdev->resume = mtl_resume;
pmcdev->regmap_list = mtl_pmc_info_list; pmcdev->regmap_list = mtl_pmc_info_list;
pmc_core_ssram_init(pmcdev);
/* If regbase not assigned, set map and discover using legacy method */ /*
if (!pmc->regbase) { * If ssram init fails use legacy method to at least get the
* primary PMC
*/
ret = pmc_core_ssram_init(pmcdev);
if (ret) {
dev_warn(&pmcdev->pdev->dev,
"ssram init failed, %d, using legacy init\n", ret);
pmc->map = &mtl_socm_reg_map; pmc->map = &mtl_socm_reg_map;
ret = get_primary_reg_base(pmc); ret = get_primary_reg_base(pmc);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment