linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
@ 2019-11-14 17:01 Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 1/7] x86/intel_pmc_core: Fix the SoC naming inconsistency Gayatri Kammela
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

Hi,

Patch 1: Fix SoC naming inconsistency
Patch 2: Cleans up termination lines
Patch 3: Refactor driver for ease of adding new SoCs
Patch 4: Add debugfs entry for PCH IPs only if platform supports
Patch 5: Add Tiger Lake legacy support to pmc_core
Patch 6: Add Elkhart Lake legacy support to pmc_core
patch 7: Add Comet Lake legacy support to pmc_core

All the information regarding the PCH IPs and names of IPs will be
available in Intel's Platform Controller Hub (PCH) External Design
Specification (EDS) document expected to be released in 2020 before
product launch.

Changes since v1:
1) Added a patch that fixes the naming inconsistency.
2) Fixed the prefix of all the patches.

Changes since v2:
1) Add Comet Lake legacy support to pmc_core up on Dell's request

Gayatri Kammela (7):
  x86/intel_pmc_core: Fix the SoC naming inconsistency
  x86/intel_pmc_core: Clean up: Remove comma after the termination line
  x86/intel_pmc_core: Create platform dependent pmc bitmap structs
  x86/intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status
    conditional
  platform/x86: Add Tiger Lake (TGL) platform support to intel_pmc_core
    driver
  platform/x86: Add Atom based Elkhart Lake (EHL) platform support to
    intel_pmc_core driver
  platform/x86: Add Comet Lake (CML) platform support to intel_pmc_core
    driver

 drivers/platform/x86/intel_pmc_core.c | 121 ++++++++++++++++++++------
 drivers/platform/x86/intel_pmc_core.h |   2 +-
 2 files changed, 96 insertions(+), 27 deletions(-)

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>

-- 
2.17.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 1/7] x86/intel_pmc_core: Fix the SoC naming inconsistency
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 2/7] x86/intel_pmc_core: Clean up: Remove comma after the termination line Gayatri Kammela
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

Intel's SoCs follow a naming convention which spells out the SoC name as
two words instead of one word (E.g: Cannon Lake vs Cannonlake). Thus fix
the naming inconsistency across the intel_pmc_core driver, so future
SoCs can follow the naming consistency as below.

Tigerlake -> Tiger Lake
Elkhartlake -> Elkhart Lake

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 94a008efb09b..6b6edc30f835 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -158,7 +158,7 @@ static const struct pmc_reg_map spt_reg_map = {
 	.pm_vric1_offset = SPT_PMC_VRIC1_OFFSET,
 };
 
-/* Cannonlake: PGD PFET Enable Ack Status Register(s) bitmap */
+/* Cannon Lake: PGD PFET Enable Ack Status Register(s) bitmap */
 static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"PMC",                 BIT(0)},
 	{"OPI-DMI",             BIT(1)},
@@ -185,7 +185,7 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"SDX",                 BIT(4)},
 	{"SPE",                 BIT(5)},
 	{"Fuse",                BIT(6)},
-	/* Reserved for Cannonlake but valid for Icelake */
+	/* Reserved for Cannon Lake but valid for Ice Lake */
 	{"SBR8",		BIT(7)},
 
 	{"CSME_FSC",            BIT(0)},
@@ -229,12 +229,12 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"HDA_PGD4",            BIT(2)},
 	{"HDA_PGD5",            BIT(3)},
 	{"HDA_PGD6",            BIT(4)},
-	/* Reserved for Cannonlake but valid for Icelake */
+	/* Reserved for Cannon Lake but valid for Ice Lake */
 	{"PSF6",		BIT(5)},
 	{"PSF7",		BIT(6)},
 	{"PSF8",		BIT(7)},
 
-	/* Icelake generation onwards only */
+	/* Ice Lake generation onwards only */
 	{"RES_65",		BIT(0)},
 	{"RES_66",		BIT(1)},
 	{"RES_67",		BIT(2)},
@@ -324,7 +324,7 @@ static const struct pmc_bit_map cnp_ltr_show_map[] = {
 	{"ISH",			CNP_PMC_LTR_ISH},
 	{"UFSX2",		CNP_PMC_LTR_UFSX2},
 	{"EMMC",		CNP_PMC_LTR_EMMC},
-	/* Reserved for Cannonlake but valid for Icelake */
+	/* Reserved for Cannon Lake but valid for Ice Lake */
 	{"WIGIG",		ICL_PMC_LTR_WIGIG},
 	/* Below two cannot be used for LTR_IGNORE */
 	{"CURRENT_PLATFORM",	CNP_PMC_LTR_CUR_PLT},
@@ -871,8 +871,8 @@ static int pmc_core_probe(struct platform_device *pdev)
 	pmcdev->map = (struct pmc_reg_map *)cpu_id->driver_data;
 
 	/*
-	 * Coffeelake has CPU ID of Kabylake and Cannonlake PCH. So here
-	 * Sunrisepoint PCH regmap can't be used. Use Cannonlake PCH regmap
+	 * Coffee Lake has CPU ID of Kaby Lake and Cannon Lake PCH. So here
+	 * Sunrisepoint PCH regmap can't be used. Use Cannon Lake PCH regmap
 	 * in this case.
 	 */
 	if (pmcdev->map == &spt_reg_map && !pci_dev_present(pmc_pci_ids))
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 2/7] x86/intel_pmc_core: Clean up: Remove comma after the termination line
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 1/7] x86/intel_pmc_core: Fix the SoC naming inconsistency Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 3/7] x86/intel_pmc_core: Create platform dependent pmc bitmap structs Gayatri Kammela
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

It is common practice to place a comma after the last entry in an
initialized array to avoid the need to add one in future patches that
extend the array. But when the last element is a termination marker, the
comma could be harmful. Any new entries must be added before the
terminator (and the comma would prevent the compiler from issuing a
warning about an entry after the terminator).

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 6b6edc30f835..3c07a0172764 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -49,7 +49,7 @@ static const struct pmc_bit_map spt_pll_map[] = {
 	{"GEN2 USB2PCIE2 PLL",		SPT_PMC_BIT_MPHY_CMN_LANE1},
 	{"DMIPCIE3 PLL",		SPT_PMC_BIT_MPHY_CMN_LANE2},
 	{"SATA PLL",			SPT_PMC_BIT_MPHY_CMN_LANE3},
-	{},
+	{}
 };
 
 static const struct pmc_bit_map spt_mphy_map[] = {
@@ -69,7 +69,7 @@ static const struct pmc_bit_map spt_mphy_map[] = {
 	{"MPHY CORE LANE 13",          SPT_PMC_BIT_MPHY_LANE13},
 	{"MPHY CORE LANE 14",          SPT_PMC_BIT_MPHY_LANE14},
 	{"MPHY CORE LANE 15",          SPT_PMC_BIT_MPHY_LANE15},
-	{},
+	{}
 };
 
 static const struct pmc_bit_map spt_pfear_map[] = {
@@ -113,7 +113,7 @@ static const struct pmc_bit_map spt_pfear_map[] = {
 	{"CSME_SMS1",			SPT_PMC_BIT_CSME_SMS1},
 	{"CSME_RTC",			SPT_PMC_BIT_CSME_RTC},
 	{"CSME_PSF",			SPT_PMC_BIT_CSME_PSF},
-	{},
+	{}
 };
 
 static const struct pmc_bit_map spt_ltr_show_map[] = {
@@ -299,7 +299,7 @@ static const struct pmc_bit_map *cnp_slps0_dbg_maps[] = {
 	cnp_slps0_dbg0_map,
 	cnp_slps0_dbg1_map,
 	cnp_slps0_dbg2_map,
-	NULL,
+	NULL
 };
 
 static const struct pmc_bit_map cnp_ltr_show_map[] = {
@@ -820,7 +820,7 @@ MODULE_DEVICE_TABLE(x86cpu, intel_pmc_core_ids);
 
 static const struct pci_device_id pmc_pci_ids[] = {
 	{ PCI_VDEVICE(INTEL, SPT_PMC_PCI_DEVICE_ID), 0},
-	{ 0, },
+	{ 0, }
 };
 
 /*
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 3/7] x86/intel_pmc_core: Create platform dependent pmc bitmap structs
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 1/7] x86/intel_pmc_core: Fix the SoC naming inconsistency Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 2/7] x86/intel_pmc_core: Clean up: Remove comma after the termination line Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 4/7] x86/intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional Gayatri Kammela
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

The current implementation of pmc_core driver allows to reuse, but does
not reflect the exact number and names of IPs for a newer platform which
does not necessarily support all the IPs in the entries. The names and
number of these IPs might differ from its previous platforms. The number
of PCH IPs per platform is calculated based on PPFEAR_NUM_ENTRIES
defined, where each entry represents a bucket (8 bits). The platform can
support 'n' entries, but not necessarily all 'n*8' IPs.

Create platform dependent bitmap structures to specify the exact number,
names of IPs while reusing the existing IPs.

The changes in this patch are preparatory to accommodate future SoCs
that might reuse the CNL/ICL PCH IPs, and to reflect the exact number of
IPs with its names.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 46 ++++++++++++++++++++-------
 drivers/platform/x86/intel_pmc_core.h |  2 +-
 2 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 3c07a0172764..a945a0081ebe 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -116,6 +116,11 @@ static const struct pmc_bit_map spt_pfear_map[] = {
 	{}
 };
 
+static const struct pmc_bit_map *ext_spt_pfear_map[] = {
+	spt_pfear_map,
+	NULL
+};
+
 static const struct pmc_bit_map spt_ltr_show_map[] = {
 	{"SOUTHPORT_A",		SPT_PMC_LTR_SPA},
 	{"SOUTHPORT_B",		SPT_PMC_LTR_SPB},
@@ -142,7 +147,7 @@ static const struct pmc_bit_map spt_ltr_show_map[] = {
 };
 
 static const struct pmc_reg_map spt_reg_map = {
-	.pfear_sts = spt_pfear_map,
+	.pfear_sts = ext_spt_pfear_map,
 	.mphy_sts = spt_mphy_map,
 	.pll_sts = spt_pll_map,
 	.ltr_show_sts = spt_ltr_show_map,
@@ -233,7 +238,15 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"PSF6",		BIT(5)},
 	{"PSF7",		BIT(6)},
 	{"PSF8",		BIT(7)},
+	{}
+};
+
+static const struct pmc_bit_map *ext_cnp_pfear_map[] = {
+	cnp_pfear_map,
+	NULL
+};
 
+static const struct pmc_bit_map icl_pfear_map[] = {
 	/* Ice Lake generation onwards only */
 	{"RES_65",		BIT(0)},
 	{"RES_66",		BIT(1)},
@@ -246,6 +259,12 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{}
 };
 
+static const struct pmc_bit_map *ext_icl_pfear_map[] = {
+	cnp_pfear_map,
+	icl_pfear_map,
+	NULL
+};
+
 static const struct pmc_bit_map cnp_slps0_dbg0_map[] = {
 	{"AUDIO_D3",		BIT(0)},
 	{"OTG_D3",		BIT(1)},
@@ -333,7 +352,7 @@ static const struct pmc_bit_map cnp_ltr_show_map[] = {
 };
 
 static const struct pmc_reg_map cnp_reg_map = {
-	.pfear_sts = cnp_pfear_map,
+	.pfear_sts = ext_cnp_pfear_map,
 	.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
 	.slps0_dbg_maps = cnp_slps0_dbg_maps,
 	.ltr_show_sts = cnp_ltr_show_map,
@@ -349,7 +368,7 @@ static const struct pmc_reg_map cnp_reg_map = {
 };
 
 static const struct pmc_reg_map icl_reg_map = {
-	.pfear_sts = cnp_pfear_map,
+	.pfear_sts = ext_icl_pfear_map,
 	.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
 	.slps0_dbg_maps = cnp_slps0_dbg_maps,
 	.ltr_show_sts = cnp_ltr_show_map,
@@ -411,20 +430,20 @@ static int pmc_core_check_read_lock_bit(void)
 #if IS_ENABLED(CONFIG_DEBUG_FS)
 static bool slps0_dbg_latch;
 
-static void pmc_core_display_map(struct seq_file *s, int index,
-				 u8 pf_reg, const struct pmc_bit_map *pf_map)
+static void pmc_core_display_map(struct seq_file *s, int index, int idx, int ip,
+				 u8 pf_reg, const struct pmc_bit_map **pf_map)
 {
 	seq_printf(s, "PCH IP: %-2d - %-32s\tState: %s\n",
-		   index, pf_map[index].name,
-		   pf_map[index].bit_mask & pf_reg ? "Off" : "On");
+		   ip, pf_map[idx][index].name,
+		   pf_map[idx][index].bit_mask & pf_reg ? "Off" : "On");
 }
 
 static int pmc_core_ppfear_show(struct seq_file *s, void *unused)
 {
 	struct pmc_dev *pmcdev = s->private;
-	const struct pmc_bit_map *map = pmcdev->map->pfear_sts;
+	const struct pmc_bit_map **maps = pmcdev->map->pfear_sts;
 	u8 pf_regs[PPFEAR_MAX_NUM_ENTRIES];
-	int index, iter;
+	int index, iter, idx, ip = 0;
 
 	iter = pmcdev->map->ppfear0_offset;
 
@@ -432,9 +451,12 @@ static int pmc_core_ppfear_show(struct seq_file *s, void *unused)
 	     index < PPFEAR_MAX_NUM_ENTRIES; index++, iter++)
 		pf_regs[index] = pmc_core_reg_read_byte(pmcdev, iter);
 
-	for (index = 0; map[index].name &&
-	     index < pmcdev->map->ppfear_buckets * 8; index++)
-		pmc_core_display_map(s, index, pf_regs[index / 8], map);
+	for (idx = 0; maps[idx]; idx++) {
+		for (index = 0; maps[idx][index].name &&
+		     index < pmcdev->map->ppfear_buckets * 8; ip++, index++)
+			pmc_core_display_map(s, index, idx, ip,
+					     pf_regs[index / 8], maps);
+	}
 
 	return 0;
 }
diff --git a/drivers/platform/x86/intel_pmc_core.h b/drivers/platform/x86/intel_pmc_core.h
index fdee5772e532..4b9f9ad6b692 100644
--- a/drivers/platform/x86/intel_pmc_core.h
+++ b/drivers/platform/x86/intel_pmc_core.h
@@ -213,7 +213,7 @@ struct pmc_bit_map {
  * captures them to have a common implementation.
  */
 struct pmc_reg_map {
-	const struct pmc_bit_map *pfear_sts;
+	const struct pmc_bit_map **pfear_sts;
 	const struct pmc_bit_map *mphy_sts;
 	const struct pmc_bit_map *pll_sts;
 	const struct pmc_bit_map **slps0_dbg_maps;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 4/7] x86/intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
                   ` (2 preceding siblings ...)
  2019-11-14 17:01 ` [PATCH v3 3/7] x86/intel_pmc_core: Create platform dependent pmc bitmap structs Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 5/7] platform/x86: Add Tiger Lake (TGL) platform support to intel_pmc_core driver Gayatri Kammela
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

Check if the platform supports and only then add a debugfs entry for PCH
IP power gating status.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index a945a0081ebe..fa91f3127460 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -788,8 +788,9 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev)
 	debugfs_create_file("slp_s0_residency_usec", 0444, dir, pmcdev,
 			    &pmc_core_dev_state);
 
-	debugfs_create_file("pch_ip_power_gating_status", 0444, dir, pmcdev,
-			    &pmc_core_ppfear_fops);
+	if (pmcdev->map->pfear_sts)
+		debugfs_create_file("pch_ip_power_gating_status", 0444, dir,
+				    pmcdev, &pmc_core_ppfear_fops);
 
 	debugfs_create_file("ltr_ignore", 0644, dir, pmcdev,
 			    &pmc_core_ltr_ignore_ops);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 5/7] platform/x86: Add Tiger Lake (TGL) platform support to intel_pmc_core driver
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
                   ` (3 preceding siblings ...)
  2019-11-14 17:01 ` [PATCH v3 4/7] x86/intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 6/7] platform/x86: Add Atom based Elkhart Lake (EHL) " Gayatri Kammela
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

Add Tiger Lake to the list of the platforms that intel_pmc_core driver
supports for the pmc_core device.

Just like Ice Lake, Tiger Lake can also reuse all the Cannon Lake PCH
IPs. Since Tiger Lake has almost the same number of PCH IPs as Ice Lake,
reuse Ice Lake's PPFEAR_NUM_ENTRIES instead of defining a new macro.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 40 +++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index fa91f3127460..b708c04db752 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -190,7 +190,7 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"SDX",                 BIT(4)},
 	{"SPE",                 BIT(5)},
 	{"Fuse",                BIT(6)},
-	/* Reserved for Cannon Lake but valid for Ice Lake */
+	/* Reserved for Cannon Lake but valid for Ice Lake and Tiger Lake */
 	{"SBR8",		BIT(7)},
 
 	{"CSME_FSC",            BIT(0)},
@@ -234,7 +234,7 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"HDA_PGD4",            BIT(2)},
 	{"HDA_PGD5",            BIT(3)},
 	{"HDA_PGD6",            BIT(4)},
-	/* Reserved for Cannon Lake but valid for Ice Lake */
+	/* Reserved for Cannon Lake but valid for Ice Lake and Tiger Lake */
 	{"PSF6",		BIT(5)},
 	{"PSF7",		BIT(6)},
 	{"PSF8",		BIT(7)},
@@ -265,6 +265,24 @@ static const struct pmc_bit_map *ext_icl_pfear_map[] = {
 	NULL
 };
 
+static const struct pmc_bit_map tgl_pfear_map[] = {
+	/* Tiger Lake generation onwards only */
+	{"PSF9",		BIT(0)},
+	{"RES_66",		BIT(1)},
+	{"RES_67",		BIT(2)},
+	{"RES_68",		BIT(3)},
+	{"RES_69",		BIT(4)},
+	{"RES_70",		BIT(5)},
+	{"TBTLSX",		BIT(6)},
+	{}
+};
+
+static const struct pmc_bit_map *ext_tgl_pfear_map[] = {
+	cnp_pfear_map,
+	tgl_pfear_map,
+	NULL
+};
+
 static const struct pmc_bit_map cnp_slps0_dbg0_map[] = {
 	{"AUDIO_D3",		BIT(0)},
 	{"OTG_D3",		BIT(1)},
@@ -383,6 +401,22 @@ static const struct pmc_reg_map icl_reg_map = {
 	.ltr_ignore_max = ICL_NUM_IP_IGN_ALLOWED,
 };
 
+static const struct pmc_reg_map tgl_reg_map = {
+	.pfear_sts = ext_tgl_pfear_map,
+	.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
+	.slps0_dbg_maps = cnp_slps0_dbg_maps,
+	.ltr_show_sts = cnp_ltr_show_map,
+	.msr_sts = msr_map,
+	.slps0_dbg_offset = CNP_PMC_SLPS0_DBG_OFFSET,
+	.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET,
+	.regmap_length = CNP_PMC_MMIO_REG_LEN,
+	.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A,
+	.ppfear_buckets = ICL_PPFEAR_NUM_ENTRIES,
+	.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
+	.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
+	.ltr_ignore_max = ICL_NUM_IP_IGN_ALLOWED,
+};
+
 static inline u8 pmc_core_reg_read_byte(struct pmc_dev *pmcdev, int offset)
 {
 	return readb(pmcdev->regbase + offset);
@@ -836,6 +870,8 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
 	INTEL_CPU_FAM6(CANNONLAKE_L, cnp_reg_map),
 	INTEL_CPU_FAM6(ICELAKE_L, icl_reg_map),
 	INTEL_CPU_FAM6(ICELAKE_NNPI, icl_reg_map),
+	INTEL_CPU_FAM6(TIGERLAKE_L, tgl_reg_map),
+	INTEL_CPU_FAM6(TIGERLAKE, tgl_reg_map),
 	{}
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 6/7] platform/x86: Add Atom based Elkhart Lake (EHL) platform support to intel_pmc_core driver
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
                   ` (4 preceding siblings ...)
  2019-11-14 17:01 ` [PATCH v3 5/7] platform/x86: Add Tiger Lake (TGL) platform support to intel_pmc_core driver Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 17:01 ` [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) " Gayatri Kammela
  2019-11-18 10:50 ` [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Andy Shevchenko
  7 siblings, 0 replies; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

Add Elkhart Lake to the list of the platforms that intel_pmc_core
driver supports for pmc_core device.

Just like Ice Lake and Tiger Lake, Elkhart Lake can also reuse all the
Cannon Lake PCH IPs. Also, it uses the same PCH IPs of Tiger Lake, no
additional effort is needed to enable but to simply reuse them.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index b708c04db752..94081710e0de 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -190,7 +190,10 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"SDX",                 BIT(4)},
 	{"SPE",                 BIT(5)},
 	{"Fuse",                BIT(6)},
-	/* Reserved for Cannon Lake but valid for Ice Lake and Tiger Lake */
+	/*
+	 * Reserved for Cannon Lake but valid for Ice Lake,
+	 * Tiger Lake and Elkhart Lake.
+	 */
 	{"SBR8",		BIT(7)},
 
 	{"CSME_FSC",            BIT(0)},
@@ -234,7 +237,10 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 	{"HDA_PGD4",            BIT(2)},
 	{"HDA_PGD5",            BIT(3)},
 	{"HDA_PGD6",            BIT(4)},
-	/* Reserved for Cannon Lake but valid for Ice Lake and Tiger Lake */
+	/*
+	 * Reserved for Cannon Lake but valid for Ice Lake,
+	 * Tiger Lake and Elkhart Lake.
+	 */
 	{"PSF6",		BIT(5)},
 	{"PSF7",		BIT(6)},
 	{"PSF8",		BIT(7)},
@@ -266,7 +272,7 @@ static const struct pmc_bit_map *ext_icl_pfear_map[] = {
 };
 
 static const struct pmc_bit_map tgl_pfear_map[] = {
-	/* Tiger Lake generation onwards only */
+	/* Tiger Lake and Elkhart Lake generation onwards only */
 	{"PSF9",		BIT(0)},
 	{"RES_66",		BIT(1)},
 	{"RES_67",		BIT(2)},
@@ -872,6 +878,7 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
 	INTEL_CPU_FAM6(ICELAKE_NNPI, icl_reg_map),
 	INTEL_CPU_FAM6(TIGERLAKE_L, tgl_reg_map),
 	INTEL_CPU_FAM6(TIGERLAKE, tgl_reg_map),
+	INTEL_CPU_FAM6(ATOM_TREMONT, tgl_reg_map),
 	{}
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) platform support to intel_pmc_core driver
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
                   ` (5 preceding siblings ...)
  2019-11-14 17:01 ` [PATCH v3 6/7] platform/x86: Add Atom based Elkhart Lake (EHL) " Gayatri Kammela
@ 2019-11-14 17:01 ` Gayatri Kammela
  2019-11-14 18:50   ` Mario.Limonciello
  2019-11-18 10:50 ` [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Andy Shevchenko
  7 siblings, 1 reply; 16+ messages in thread
From: Gayatri Kammela @ 2019-11-14 17:01 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	Gayatri Kammela, Peter Zijlstra, Srinivas Pandruvada,
	Andy Shevchenko, Kan Liang, David E . Box, Rajneesh Bhardwaj,
	Tony Luck

Add Comet Lake to the list of the platforms that intel_pmc_core driver
supports for pmc_core device.

Just like Ice Lake, Tiger Lake and Elkhart Lake, Comet Lake can also
reuse all the Cannon Lake PCH IPs. No additional effort is needed to
enable but to simply reuse them.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: David E. Box <david.e.box@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 94081710e0de..a9b33ac4e52d 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -165,6 +165,7 @@ static const struct pmc_reg_map spt_reg_map = {
 
 /* Cannon Lake: PGD PFET Enable Ack Status Register(s) bitmap */
 static const struct pmc_bit_map cnp_pfear_map[] = {
+	/* Reserved for Cannon Lake but valid for Comet Lake */
 	{"PMC",                 BIT(0)},
 	{"OPI-DMI",             BIT(1)},
 	{"SPI/eSPI",            BIT(2)},
@@ -879,6 +880,8 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
 	INTEL_CPU_FAM6(TIGERLAKE_L, tgl_reg_map),
 	INTEL_CPU_FAM6(TIGERLAKE, tgl_reg_map),
 	INTEL_CPU_FAM6(ATOM_TREMONT, tgl_reg_map),
+	INTEL_CPU_FAM6(COMETLAKE, cnp_reg_map),
+	INTEL_CPU_FAM6(COMETLAKE_L, cnp_reg_map),
 	{}
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) platform support to intel_pmc_core driver
  2019-11-14 17:01 ` [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) " Gayatri Kammela
@ 2019-11-14 18:50   ` Mario.Limonciello
  2019-11-18 18:06     ` Kammela, Gayatri
  0 siblings, 1 reply; 16+ messages in thread
From: Mario.Limonciello @ 2019-11-14 18:50 UTC (permalink / raw)
  To: gayatri.kammela, platform-driver-x86
  Cc: vishwanath.somayaji, dvhart, linux-kernel, charles.d.prestopine,
	peterz, srinivas.pandruvada, andriy.shevchenko, kan.liang,
	david.e.box, rajneesh.bhardwaj, tony.luck

> -----Original Message-----
> From: platform-driver-x86-owner@vger.kernel.org <platform-driver-x86-
> owner@vger.kernel.org> On Behalf Of Gayatri Kammela
> Sent: Thursday, November 14, 2019 11:01 AM
> To: platform-driver-x86@vger.kernel.org
> Cc: vishwanath.somayaji@intel.com; dvhart@infradead.org; linux-
> kernel@vger.kernel.org; charles.d.prestopine@intel.com; Gayatri Kammela; Peter
> Zijlstra; Srinivas Pandruvada; Andy Shevchenko; Kan Liang; David E . Box; Rajneesh
> Bhardwaj; Tony Luck
> Subject: [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) platform support to
> intel_pmc_core driver
> 
> 
> [EXTERNAL EMAIL]
> 
> Add Comet Lake to the list of the platforms that intel_pmc_core driver
> supports for pmc_core device.
> 
> Just like Ice Lake, Tiger Lake and Elkhart Lake, Comet Lake can also
> reuse all the Cannon Lake PCH IPs. No additional effort is needed to
> enable but to simply reuse them.
> 
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Kan Liang <kan.liang@intel.com>
> Cc: David E. Box <david.e.box@intel.com>
> Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
> Cc: Tony Luck <tony.luck@intel.com>
> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
> ---
>  drivers/platform/x86/intel_pmc_core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/intel_pmc_core.c
> b/drivers/platform/x86/intel_pmc_core.c
> index 94081710e0de..a9b33ac4e52d 100644
> --- a/drivers/platform/x86/intel_pmc_core.c
> +++ b/drivers/platform/x86/intel_pmc_core.c
> @@ -165,6 +165,7 @@ static const struct pmc_reg_map spt_reg_map = {
> 
>  /* Cannon Lake: PGD PFET Enable Ack Status Register(s) bitmap */
>  static const struct pmc_bit_map cnp_pfear_map[] = {
> +	/* Reserved for Cannon Lake but valid for Comet Lake */
>  	{"PMC",                 BIT(0)},
>  	{"OPI-DMI",             BIT(1)},
>  	{"SPI/eSPI",            BIT(2)},
> @@ -879,6 +880,8 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
>  	INTEL_CPU_FAM6(TIGERLAKE_L, tgl_reg_map),
>  	INTEL_CPU_FAM6(TIGERLAKE, tgl_reg_map),
>  	INTEL_CPU_FAM6(ATOM_TREMONT, tgl_reg_map),
> +	INTEL_CPU_FAM6(COMETLAKE, cnp_reg_map),
> +	INTEL_CPU_FAM6(COMETLAKE_L, cnp_reg_map),
>  	{}
>  };
> 

Just a nit, that I'm not sure if there is a policy around.
Shouldn't the order of these reflect the actual order they're available to the
marketplace?  So CML may want to come earlier in the patch series to reflect
that aspect.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
  2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
                   ` (6 preceding siblings ...)
  2019-11-14 17:01 ` [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) " Gayatri Kammela
@ 2019-11-18 10:50 ` Andy Shevchenko
  2019-11-18 18:11   ` Kammela, Gayatri
  7 siblings, 1 reply; 16+ messages in thread
From: Andy Shevchenko @ 2019-11-18 10:50 UTC (permalink / raw)
  To: Gayatri Kammela
  Cc: Platform Driver, Vishwanath Somayaji, Darren Hart,
	Linux Kernel Mailing List, Prestopine, Charles D, Peter Zijlstra,
	Srinivas Pandruvada, Andy Shevchenko, Kan Liang, David E . Box,
	Rajneesh Bhardwaj, Tony Luck

On Thu, Nov 14, 2019 at 7:02 PM Gayatri Kammela
<gayatri.kammela@intel.com> wrote:
>
> Hi,
>
> Patch 1: Fix SoC naming inconsistency
> Patch 2: Cleans up termination lines
> Patch 3: Refactor driver for ease of adding new SoCs
> Patch 4: Add debugfs entry for PCH IPs only if platform supports
> Patch 5: Add Tiger Lake legacy support to pmc_core
> Patch 6: Add Elkhart Lake legacy support to pmc_core
> patch 7: Add Comet Lake legacy support to pmc_core
>
> All the information regarding the PCH IPs and names of IPs will be
> available in Intel's Platform Controller Hub (PCH) External Design
> Specification (EDS) document expected to be released in 2020 before
> product launch.

Thanks, though you forgot to fix all prefixes in the mails. We have
platform/x86: $DRIVER_NAME: ...

Also consider Mario's comment (I didn't hear back from you on it).

>
> Changes since v1:
> 1) Added a patch that fixes the naming inconsistency.
> 2) Fixed the prefix of all the patches.
>
> Changes since v2:
> 1) Add Comet Lake legacy support to pmc_core up on Dell's request
>
> Gayatri Kammela (7):
>   x86/intel_pmc_core: Fix the SoC naming inconsistency
>   x86/intel_pmc_core: Clean up: Remove comma after the termination line
>   x86/intel_pmc_core: Create platform dependent pmc bitmap structs
>   x86/intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status
>     conditional
>   platform/x86: Add Tiger Lake (TGL) platform support to intel_pmc_core
>     driver
>   platform/x86: Add Atom based Elkhart Lake (EHL) platform support to
>     intel_pmc_core driver
>   platform/x86: Add Comet Lake (CML) platform support to intel_pmc_core
>     driver
>
>  drivers/platform/x86/intel_pmc_core.c | 121 ++++++++++++++++++++------
>  drivers/platform/x86/intel_pmc_core.h |   2 +-
>  2 files changed, 96 insertions(+), 27 deletions(-)
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Kan Liang <kan.liang@intel.com>
> Cc: David E. Box <david.e.box@intel.com>
> Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
> Cc: Tony Luck <tony.luck@intel.com>
>
> --
> 2.17.1
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) platform support to intel_pmc_core driver
  2019-11-14 18:50   ` Mario.Limonciello
@ 2019-11-18 18:06     ` Kammela, Gayatri
  0 siblings, 0 replies; 16+ messages in thread
From: Kammela, Gayatri @ 2019-11-18 18:06 UTC (permalink / raw)
  To: Mario.Limonciello, platform-driver-x86
  Cc: Somayaji, Vishwanath, dvhart, linux-kernel, Prestopine,
	Charles D, peterz, Pandruvada, Srinivas, andriy.shevchenko,
	Liang, Kan, Box, David E, Bhardwaj, Rajneesh, Luck, Tony

> >  /* Cannon Lake: PGD PFET Enable Ack Status Register(s) bitmap */
> > static const struct pmc_bit_map cnp_pfear_map[] = {
> > +	/* Reserved for Cannon Lake but valid for Comet Lake */
> >  	{"PMC",                 BIT(0)},
> >  	{"OPI-DMI",             BIT(1)},
> >  	{"SPI/eSPI",            BIT(2)},
> > @@ -879,6 +880,8 @@ static const struct x86_cpu_id intel_pmc_core_ids[]
> = {
> >  	INTEL_CPU_FAM6(TIGERLAKE_L, tgl_reg_map),
> >  	INTEL_CPU_FAM6(TIGERLAKE, tgl_reg_map),
> >  	INTEL_CPU_FAM6(ATOM_TREMONT, tgl_reg_map),
> > +	INTEL_CPU_FAM6(COMETLAKE, cnp_reg_map),
> > +	INTEL_CPU_FAM6(COMETLAKE_L, cnp_reg_map),
> >  	{}
> >  };
> >
> 
> Just a nit, that I'm not sure if there is a policy around.
> Shouldn't the order of these reflect the actual order they're available to the
> marketplace?  So CML may want to come earlier in the patch series to reflect
> that aspect.
 Hi Mario,  agreed! I will send this patch separately from the series as this is an urgent request from Dell.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
  2019-11-18 10:50 ` [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Andy Shevchenko
@ 2019-11-18 18:11   ` Kammela, Gayatri
  2019-11-18 18:18     ` Mario.Limonciello
  2019-11-18 18:23     ` Andy Shevchenko
  0 siblings, 2 replies; 16+ messages in thread
From: Kammela, Gayatri @ 2019-11-18 18:11 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Platform Driver, Somayaji, Vishwanath, Darren Hart,
	Linux Kernel Mailing List, Prestopine, Charles D, Peter Zijlstra,
	Pandruvada, Srinivas, Andy Shevchenko, Liang, Kan, Box, David E,
	Bhardwaj, Rajneesh, Luck, Tony

> > All the information regarding the PCH IPs and names of IPs will be
> > available in Intel's Platform Controller Hub (PCH) External Design
> > Specification (EDS) document expected to be released in 2020 before
> > product launch.
> 
> Thanks, though you forgot to fix all prefixes in the mails. We have
> platform/x86: $DRIVER_NAME: ...
> 
Hi Andy! Sorry I think I misunderstood your comment last time. Just to make sure, the prefix should the pattern in this case
"platform/x86: intel_pmc_core: " and should be same for all the patches in the series right?

> Also consider Mario's comment (I didn't hear back from you on it).
Sorry about that. I am planning on sending it a single patch excluding it from the series since we received a request from Dell. Please let me know if you think this patch should be included in the series. 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
  2019-11-18 18:11   ` Kammela, Gayatri
@ 2019-11-18 18:18     ` Mario.Limonciello
  2019-11-18 19:12       ` Kammela, Gayatri
  2019-11-18 18:23     ` Andy Shevchenko
  1 sibling, 1 reply; 16+ messages in thread
From: Mario.Limonciello @ 2019-11-18 18:18 UTC (permalink / raw)
  To: gayatri.kammela, andy.shevchenko
  Cc: platform-driver-x86, vishwanath.somayaji, dvhart, linux-kernel,
	charles.d.prestopine, peterz, srinivas.pandruvada,
	andriy.shevchenko, kan.liang, david.e.box, rajneesh.bhardwaj,
	tony.luck

> -----Original Message-----
> From: platform-driver-x86-owner@vger.kernel.org <platform-driver-x86-
> owner@vger.kernel.org> On Behalf Of Kammela, Gayatri
> Sent: Monday, November 18, 2019 12:11 PM
> To: Andy Shevchenko
> Cc: Platform Driver; Somayaji, Vishwanath; Darren Hart; Linux Kernel Mailing
> List; Prestopine, Charles D; Peter Zijlstra; Pandruvada, Srinivas; Andy
> Shevchenko; Liang, Kan; Box, David E; Bhardwaj, Rajneesh; Luck, Tony
> Subject: RE: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
> 
> 
> [EXTERNAL EMAIL]
> 
> > > All the information regarding the PCH IPs and names of IPs will be
> > > available in Intel's Platform Controller Hub (PCH) External Design
> > > Specification (EDS) document expected to be released in 2020 before
> > > product launch.
> >
> > Thanks, though you forgot to fix all prefixes in the mails. We have
> > platform/x86: $DRIVER_NAME: ...
> >
> Hi Andy! Sorry I think I misunderstood your comment last time. Just to make
> sure, the prefix should the pattern in this case
> "platform/x86: intel_pmc_core: " and should be same for all the patches in the
> series right?
> 
> > Also consider Mario's comment (I didn't hear back from you on it).
> Sorry about that. I am planning on sending it a single patch excluding it from the
> series since we received a request from Dell. Please let me know if you think this
> patch should be included in the series.

Just to make it clear to those on the list - the request from Dell was off list and separately
from my comment in adjusting the ordering.  A convenient side effect is that it will
take into consideration my comment too :)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
  2019-11-18 18:11   ` Kammela, Gayatri
  2019-11-18 18:18     ` Mario.Limonciello
@ 2019-11-18 18:23     ` Andy Shevchenko
  2019-11-18 19:15       ` Kammela, Gayatri
  1 sibling, 1 reply; 16+ messages in thread
From: Andy Shevchenko @ 2019-11-18 18:23 UTC (permalink / raw)
  To: Kammela, Gayatri
  Cc: Platform Driver, Somayaji, Vishwanath, Darren Hart,
	Linux Kernel Mailing List, Prestopine, Charles D, Peter Zijlstra,
	Pandruvada, Srinivas, Liang, Kan, Box, David E, Bhardwaj,
	Rajneesh, Luck, Tony

On Mon, Nov 18, 2019 at 06:11:16PM +0000, Kammela, Gayatri wrote:
> > > All the information regarding the PCH IPs and names of IPs will be
> > > available in Intel's Platform Controller Hub (PCH) External Design
> > > Specification (EDS) document expected to be released in 2020 before
> > > product launch.
> > 
> > Thanks, though you forgot to fix all prefixes in the mails. We have
> > platform/x86: $DRIVER_NAME: ...
> > 
> Hi Andy! Sorry I think I misunderstood your comment last time. Just to make sure, the prefix should the pattern in this case
> "platform/x86: intel_pmc_core: " and should be same for all the patches in the series right?

I didn't deeply check myself, but sounds right.

> > Also consider Mario's comment (I didn't hear back from you on it).
> Sorry about that. I am planning on sending it a single patch excluding it from the series since we received a request from Dell. Please let me know if you think this patch should be included in the series. 

I think we keep good relationship with Dell.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
  2019-11-18 18:18     ` Mario.Limonciello
@ 2019-11-18 19:12       ` Kammela, Gayatri
  0 siblings, 0 replies; 16+ messages in thread
From: Kammela, Gayatri @ 2019-11-18 19:12 UTC (permalink / raw)
  To: Mario.Limonciello, andy.shevchenko
  Cc: platform-driver-x86, Somayaji, Vishwanath, dvhart, linux-kernel,
	Prestopine, Charles D, peterz, Pandruvada, Srinivas,
	andriy.shevchenko, Liang, Kan, Box, David E, Bhardwaj, Rajneesh,
	Luck, Tony

> >
> > > Also consider Mario's comment (I didn't hear back from you on it).
> > Sorry about that. I am planning on sending it a single patch excluding
> > it from the series since we received a request from Dell. Please let
> > me know if you think this patch should be included in the series.
> 
> Just to make it clear to those on the list - the request from Dell was off list
> and separately from my comment in adjusting the ordering.  A convenient
> side effect is that it will take into consideration my comment too :)
I have just sent v1 of Comet Lake patch in a new series. Thanks Mario! 😊

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake
  2019-11-18 18:23     ` Andy Shevchenko
@ 2019-11-18 19:15       ` Kammela, Gayatri
  0 siblings, 0 replies; 16+ messages in thread
From: Kammela, Gayatri @ 2019-11-18 19:15 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Platform Driver, Somayaji, Vishwanath, Darren Hart,
	Linux Kernel Mailing List, Prestopine, Charles D, Peter Zijlstra,
	Pandruvada, Srinivas, Liang, Kan, Box, David E, Bhardwaj,
	Rajneesh, Luck, Tony

> > Hi Andy! Sorry I think I misunderstood your comment last time. Just to
> > make sure, the prefix should the pattern in this case
> > "platform/x86: intel_pmc_core: " and should be same for all the patches in
> the series right?
> 
> I didn't deeply check myself, but sounds right.
Thanks for confirming!
> 
> > > Also consider Mario's comment (I didn't hear back from you on it).
> > Sorry about that. I am planning on sending it a single patch excluding it from
> the series since we received a request from Dell. Please let me know if you
> think this patch should be included in the series.
> 
> I think we keep good relationship with Dell.
Yeah 😊
Andy, before I send out v4 of this series (with two patches dropped and addressing your comment about prefix),  are there any new comments on the rest of patches? Or shall I go ahead and submit v4? Please suggest.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-11-18 19:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 17:01 [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 1/7] x86/intel_pmc_core: Fix the SoC naming inconsistency Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 2/7] x86/intel_pmc_core: Clean up: Remove comma after the termination line Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 3/7] x86/intel_pmc_core: Create platform dependent pmc bitmap structs Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 4/7] x86/intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 5/7] platform/x86: Add Tiger Lake (TGL) platform support to intel_pmc_core driver Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 6/7] platform/x86: Add Atom based Elkhart Lake (EHL) " Gayatri Kammela
2019-11-14 17:01 ` [PATCH v3 7/7] platform/x86: Add Comet Lake (CML) " Gayatri Kammela
2019-11-14 18:50   ` Mario.Limonciello
2019-11-18 18:06     ` Kammela, Gayatri
2019-11-18 10:50 ` [PATCH v3 0/7] x86/intel_pmc_core: Add Tiger Lake, Elkhart Lake Andy Shevchenko
2019-11-18 18:11   ` Kammela, Gayatri
2019-11-18 18:18     ` Mario.Limonciello
2019-11-18 19:12       ` Kammela, Gayatri
2019-11-18 18:23     ` Andy Shevchenko
2019-11-18 19:15       ` Kammela, Gayatri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).