Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Intel-SIG] MTL platform driver updates sync with upstream (6.9) #248

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drivers/platform/x86/intel/pmc/arl.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,15 @@ static struct pmc_info arl_pmc_info_list[] = {
};

#define ARL_NPU_PCI_DEV 0xad1d
#define ARL_GNA_PCI_DEV 0xae4c
/*
* Set power state of select devices that do not have drivers to D3
* so that they do not block Package C entry.
*/
static void arl_d3_fixup(void)
{
pmc_core_set_device_d3(ARL_NPU_PCI_DEV);
pmc_core_set_device_d3(ARL_GNA_PCI_DEV);
}

static int arl_resume(struct pmc_dev *pmcdev)
Expand Down
43 changes: 8 additions & 35 deletions drivers/platform/x86/intel/pmc/lnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@

#include "core.h"

#define SOCM_LPM_REQ_GUID 0x11594920

#define PMC_DEVID_SOCM 0xa87f

static const u8 LNL_LPM_REG_INDEX[] = {0, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20};

static struct pmc_info lnl_pmc_info_list[] = {
{
.guid = SOCM_LPM_REQ_GUID,
.devid = PMC_DEVID_SOCM,
.map = &lnl_socm_reg_map,
},
{}
};

const struct pmc_bit_map lnl_ltr_show_map[] = {
{"SOUTHPORT_A", CNP_PMC_LTR_SPA},
{"SOUTHPORT_B", CNP_PMC_LTR_SPB},
Expand Down Expand Up @@ -490,7 +475,6 @@ const struct pmc_reg_map lnl_socm_reg_map = {
.lpm_sts = lnl_lpm_maps,
.lpm_status_offset = MTL_LPM_STATUS_OFFSET,
.lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET,
.lpm_reg_index = LNL_LPM_REG_INDEX,
};

#define LNL_NPU_PCI_DEV 0x643e
Expand All @@ -509,38 +493,27 @@ static void lnl_d3_fixup(void)
static int lnl_resume(struct pmc_dev *pmcdev)
{
lnl_d3_fixup();
pmc_core_send_ltr_ignore(pmcdev, 3, 0);

return pmc_core_resume_common(pmcdev);
}

int lnl_core_init(struct pmc_dev *pmcdev)
{
int ret;
int func = 2;
bool ssram_init = true;
struct pmc *pmc = pmcdev->pmcs[PMC_IDX_SOC];

lnl_d3_fixup();

pmcdev->suspend = cnl_suspend;
pmcdev->resume = lnl_resume;
pmcdev->regmap_list = lnl_pmc_info_list;
ret = pmc_core_ssram_init(pmcdev, func);

/* If regbase not assigned, set map and discover using legacy method */
if (ret) {
ssram_init = false;
pmc->map = &lnl_socm_reg_map;
ret = get_primary_reg_base(pmc);
if (ret)
return ret;
}

pmc_core_get_low_power_modes(pmcdev);
pmc->map = &lnl_socm_reg_map;
ret = get_primary_reg_base(pmc);
if (ret)
return ret;

if (ssram_init) {
ret = pmc_core_ssram_get_lpm_reqs(pmcdev);
if (ret)
return ret;
}
pmc_core_get_low_power_modes(pmcdev);

return 0;
}
5 changes: 1 addition & 4 deletions drivers/platform/x86/intel/vsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,7 @@ static bool intel_vsec_walk_header(struct pci_dev *pdev,

for ( ; *header; header++) {
ret = intel_vsec_add_dev(pdev, *header, info);
if (ret)
dev_info(&pdev->dev, "Could not add device for VSEC id %d\n",
(*header)->id);
else
if (!ret)
have_devices = true;
}

Expand Down