]> www.infradead.org Git - users/hch/configfs.git/commitdiff
platform/x86/intel/tpmi: Move TPMI ID definition
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 4 Dec 2023 22:17:38 +0000 (14:17 -0800)
committerHans de Goede <hdegoede@redhat.com>
Mon, 11 Dec 2023 10:06:41 +0000 (11:06 +0100)
Move TPMI ID definitions to common include file. In this way other
feature drivers don't have to redefine.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231204221740.3645130-4-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/tpmi.c
include/linux/intel_tpmi.h

index 92c5c3a90d531bfb8d052a92b5cc5f25d521df36..e73cdea67fff854c5bc0236769e42aae3539d0bb 100644 (file)
@@ -170,19 +170,6 @@ struct tpmi_feature_state {
        u32 locked:1;
 } __packed;
 
-/*
- * List of supported TMPI IDs.
- * Some TMPI IDs are not used by Linux, so the numbers are not consecutive.
- */
-enum intel_tpmi_id {
-       TPMI_ID_RAPL = 0, /* Running Average Power Limit */
-       TPMI_ID_PEM = 1, /* Power and Perf excursion Monitor */
-       TPMI_ID_UNCORE = 2, /* Uncore Frequency Scaling */
-       TPMI_ID_SST = 5, /* Speed Select Technology */
-       TPMI_CONTROL_ID = 0x80, /* Special ID for getting feature status */
-       TPMI_INFO_ID = 0x81, /* Special ID for PCI BDF and Package ID information */
-};
-
 /*
  * The size from hardware is in u32 units. This size is from a trusted hardware,
  * but better to verify for pre silicon platforms. Set size to 0, when invalid.
index 4f89c5bd8663c789bd0118360f85295bc8223a53..a3529b962be6e40575001c1cbad2cd2944f3e2ea 100644 (file)
 #define TPMI_MINOR_VERSION(val)        FIELD_GET(GENMASK(4, 0), val)
 #define TPMI_MAJOR_VERSION(val)        FIELD_GET(GENMASK(7, 5), val)
 
+/*
+ * List of supported TMPI IDs.
+ * Some TMPI IDs are not used by Linux, so the numbers are not consecutive.
+ */
+enum intel_tpmi_id {
+       TPMI_ID_RAPL = 0,       /* Running Average Power Limit */
+       TPMI_ID_PEM = 1,        /* Power and Perf excursion Monitor */
+       TPMI_ID_UNCORE = 2,     /* Uncore Frequency Scaling */
+       TPMI_ID_SST = 5,        /* Speed Select Technology */
+       TPMI_CONTROL_ID = 0x80, /* Special ID for getting feature status */
+       TPMI_INFO_ID = 0x81,    /* Special ID for PCI BDF and Package ID information */
+};
+
 /**
  * struct intel_tpmi_plat_info - Platform information for a TPMI device instance
  * @package_id:        CPU Package id