platform/x86: intel_telemetry: Add GLK PSS Event Table
authorRajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Thu, 20 Jul 2017 14:21:13 +0000 (19:51 +0530)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 25 Jul 2017 17:54:03 +0000 (20:54 +0300)
Some of the Primary Subsystem events differ on Gemini Lake but the IOSS
events remain same. This patch adds the updated PSS event table to enable
Telemetry driver on Gemini Lake.

Signed-off-by: Shanth Murthy <shanth.murthy@intel.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Reviewed-by: Souvik K Chakravarty <souvik.k.chakravarty@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_telemetry_debugfs.c
drivers/platform/x86/intel_telemetry_pltdrv.c

index cd21df982abd63bbc85bdc39cc309512fcc6ec9f..d4fc42b4cbebfedeeaf39e8c65e28b2d0a8b6c0a 100644 (file)
@@ -331,6 +331,7 @@ static struct telemetry_debugfs_conf telem_apl_debugfs_conf = {
 
 static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
        TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
+       TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GEMINI_LAKE, telem_apl_debugfs_conf),
        {}
 };
 
index 6ebdbd2b04fc994e06c683ddd71a3e071cb8a8e4..6393b3b1d5a6637d7aa02fbf8ce9e616cb87e9bf 100644 (file)
@@ -153,6 +153,30 @@ static struct telemetry_evtmap
        {"PC2_AND_MEM_SHALLOW_IDLE_RES",        0x1D40},
 };
 
+static struct telemetry_evtmap
+       telemetry_glk_pss_default_events[TELEM_MAX_OS_ALLOCATED_EVENTS] = {
+       {"IA_CORE0_C6_RES",                     0x0400},
+       {"IA_CORE0_C6_CTR",                     0x0000},
+       {"IA_MODULE0_C7_RES",                   0x0410},
+       {"IA_MODULE0_C7_CTR",                   0x000C},
+       {"IA_C0_RES",                           0x0805},
+       {"PCS_LTR",                             0x2801},
+       {"PSTATES",                             0x2802},
+       {"SOC_S0I3_RES",                        0x0407},
+       {"SOC_S0I3_CTR",                        0x0008},
+       {"PCS_S0I3_CTR",                        0x0007},
+       {"PCS_C1E_RES",                         0x0414},
+       {"PCS_IDLE_STATUS",                     0x2806},
+       {"IA_PERF_LIMITS",                      0x280B},
+       {"GT_PERF_LIMITS",                      0x280C},
+       {"PCS_WAKEUP_S0IX_CTR",                 0x0025},
+       {"PCS_IDLE_BLOCKED",                    0x2C00},
+       {"PCS_S0IX_BLOCKED",                    0x2C01},
+       {"PCS_S0IX_WAKE_REASONS",               0x2C02},
+       {"PCS_LTR_BLOCKING",                    0x2C03},
+       {"PC2_AND_MEM_SHALLOW_IDLE_RES",        0x1D40},
+};
+
 /* APL specific Data */
 static struct telemetry_plt_config telem_apl_config = {
        .pss_config = {
@@ -163,8 +187,19 @@ static struct telemetry_plt_config telem_apl_config = {
        },
 };
 
+/* GLK specific Data */
+static struct telemetry_plt_config telem_glk_config = {
+       .pss_config = {
+               .telem_evts = telemetry_glk_pss_default_events,
+       },
+       .ioss_config = {
+               .telem_evts = telemetry_apl_ioss_default_events,
+       },
+};
+
 static const struct x86_cpu_id telemetry_cpu_ids[] = {
        TELEM_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_config),
+       TELEM_CPU(INTEL_FAM6_ATOM_GEMINI_LAKE, telem_glk_config),
        {}
 };