linux-loongson/drivers/platform/x86/intel/pmc/ssram_telemetry.h
Xi Pardee b5d4653962
platform/x86:intel/pmc: Create Intel PMC SSRAM Telemetry driver
Convert ssram device related functionalities to a new driver named Intel
PMC SSRAM Telemetry driver. Modify PMC Core driver to use API exported by
the driver to discover and achieve devid and PWRMBASE address information
for each available PMC. PMC Core driver needs to get PCI device when
reading from telemetry regions.

The new SSRAM driver binds to the SSRAM device and provides the following
functionalities:
1. Look for and register telemetry regions available in SSRAM device.
2. Provide devid and PWRMBASE address information for the corresponding
   PMCs.

Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://lore.kernel.org/r/20250425195237.493129-3-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-05-08 16:03:40 +03:00

25 lines
556 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Intel PMC SSRAM Telemetry PCI Driver Header File
*
* Copyright (c) 2024, Intel Corporation.
*/
#ifndef PMC_SSRAM_H
#define PMC_SSRAM_H
/**
* struct pmc_ssram_telemetry - Structure to keep pmc info in ssram device
* @devid: device id of the pmc device
* @base_addr: contains PWRM base address
*/
struct pmc_ssram_telemetry {
u16 devid;
u64 base_addr;
};
int pmc_ssram_telemetry_get_pmc_info(unsigned int pmc_idx,
struct pmc_ssram_telemetry *pmc_ssram_telemetry);
#endif /* PMC_SSRAM_H */