summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2026-06-12 14:01:45 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-06-15 02:12:58 +0300
commit4a87492cd137d158779923a034d7e742f7358952 (patch)
treef722ef2671f4c4cdf2b2045f97899816e374ba1a /drivers
parent521460e6699557f2aa0e4818110e082b76809e98 (diff)
platform/x86/intel/pmt: Pass discovery index instead of resource
Change PMT class code to pass a discovery index rather than a direct struct resource when creating entries. This allows the class to identify the discovery source generically without assuming PCI BAR resources. For PCI devices, the index still resolves to a resource in the intel_vsec_device. Other discovery sources, such as ACPI, can use the same index without needing a struct resource. Signed-off-by: David E. Box <david.e.box@linux.intel.com> Link: https://patch.msgid.link/8e785902c6a3ac1b5a9c3f0f65096553dc5acd4f.1781294741.git.david.e.box@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/intel/pmt/class.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel/pmt/class.c b/drivers/platform/x86/intel/pmt/class.c
index 9b315334a69b..7da8279b54f8 100644
--- a/drivers/platform/x86/intel/pmt/class.c
+++ b/drivers/platform/x86/intel/pmt/class.c
@@ -206,11 +206,12 @@ EXPORT_SYMBOL_GPL(intel_pmt_class);
static int intel_pmt_populate_entry(struct intel_pmt_entry *entry,
struct intel_vsec_device *ivdev,
- struct resource *disc_res)
+ int idx)
{
struct pci_dev *pci_dev = to_pci_dev(ivdev->dev);
struct device *dev = &ivdev->auxdev.dev;
struct intel_pmt_header *header = &entry->header;
+ struct resource *disc_res;
u8 bir;
/*
@@ -235,6 +236,7 @@ static int intel_pmt_populate_entry(struct intel_pmt_entry *entry,
* For access_type LOCAL, the base address is as follows:
* base address = end of discovery region + base offset
*/
+ disc_res = &ivdev->resource[idx];
entry->base_addr = disc_res->end + 1 + header->base_offset;
/*
@@ -397,7 +399,7 @@ int intel_pmt_dev_create(struct intel_pmt_entry *entry, struct intel_pmt_namespa
return ret;
}
- ret = intel_pmt_populate_entry(entry, intel_vsec_dev, disc_res);
+ ret = intel_pmt_populate_entry(entry, intel_vsec_dev, idx);
if (ret)
return ret;