Skip to contentSkip to conversation

pmc_core: Add RocketLake and other changes

PATCH In review David E. Box 4 participants 8 messages Oct 7, 2020 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

cover pmc_core: Add RocketLake and other changes

Add RocketLake platform support and other driver maintainance.

Gayatri Kammela (4):
platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments
and reorganize
platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with

    dev_info()

MAINTAINERS: Update maintainers for pmc_core driver

 MAINTAINERS                           |  4 +--
 drivers/platform/x86/intel_pmc_core.c | 39 ++++++++++++++++-----------
 2 files changed, 26 insertions(+), 17 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/4 platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments and reorganize

From: Gayatri Kammela <[email protected]>

Some of the Cannon Lake PCH IPs are reused by most of the platforms such as Ice Lake, Tiger Lake, Elkhart Lake, Jasper Lake and can be reused by future platforms as well. The same was mentioned via comments not once but twice in an array of bit map structs for Cannon Lake (cnp_pfear_map).

Hence, remove the duplicate comments and reorganize them.

Cc Srinivas Pandruvada <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc David E. Box <[email protected]>
Cc Tony Luck <[email protected]>
Cc Rui Zhang <[email protected]>
---
 drivers/platform/x86/intel_pmc_core.c | 32 +++++++++++++++++----------
 1 file changed, 20 insertions(+), 12 deletions(-)
drivers/platform/x86/intel_pmc_core.c +20 -12
index 338ea5222555..d959fa698ec5 100644
@@ -118,6 +118,10 @@ static const struct pmc_bit_map spt_pfear_map[] = {
 };
 
 static const struct pmc_bit_map *ext_spt_pfear_map[] = {
+	/*
+	 * Check intel_pmc_core_ids[] users of spt_reg_map for
+	 * a list of core SoCs using this.
+	 */
 	spt_pfear_map,
 	NULL
 };
@@ -166,7 +170,6 @@ 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)},
@@ -192,10 +195,6 @@ 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, Comet Lake,
-	 * Tiger Lake, Elkhart Lake and Jasper Lake.
-	 */
 	{"SBR8",		BIT(7)},
 
 	{"CSME_FSC",            BIT(0)},
@@ -239,10 +238,6 @@ 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, Comet Lake,
-	 * Tiger Lake, ELkhart Lake and Jasper Lake.
-	 */
 	{"PSF6",		BIT(5)},
 	{"PSF7",		BIT(6)},
 	{"PSF8",		BIT(7)},
@@ -250,12 +245,15 @@ static const struct pmc_bit_map cnp_pfear_map[] = {
 };
 
 static const struct pmc_bit_map *ext_cnp_pfear_map[] = {
+	/*
+	 * Check intel_pmc_core_ids[] users of cnp_reg_map for
+	 * a list of core SoCs using this.
+	 */
 	cnp_pfear_map,
 	NULL
 };
 
 static const struct pmc_bit_map icl_pfear_map[] = {
-	/* Ice Lake and Jasper Lake generation onwards only */
 	{"RES_65",		BIT(0)},
 	{"RES_66",		BIT(1)},
 	{"RES_67",		BIT(2)},
@@ -268,13 +266,16 @@ static const struct pmc_bit_map icl_pfear_map[] = {
 };
 
 static const struct pmc_bit_map *ext_icl_pfear_map[] = {
+	/*
+	 * Check intel_pmc_core_ids[] users of icl_reg_map for
+	 * a list of core SoCs using this.
+	 */
 	cnp_pfear_map,
 	icl_pfear_map,
 	NULL
 };
 
 static const struct pmc_bit_map tgl_pfear_map[] = {
-	/* Tiger Lake and Elkhart Lake generation onwards only */
 	{"PSF9",		BIT(0)},
 	{"RES_66",		BIT(1)},
 	{"RES_67",		BIT(2)},
@@ -286,6 +287,10 @@ static const struct pmc_bit_map tgl_pfear_map[] = {
 };
 
 static const struct pmc_bit_map *ext_tgl_pfear_map[] = {
+	/*
+	 * Check intel_pmc_core_ids[] users of tgl_reg_map for
+	 * a list of core SoCs using this.
+	 */
 	cnp_pfear_map,
 	tgl_pfear_map,
 	NULL
@@ -369,7 +374,10 @@ 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 Cannon Lake but valid for Ice Lake */
+	/*
+	 * Check intel_pmc_core_ids[] users of cnp_reg_map for
+	 * a list of core SoCs using this.
+	 */
 	{"WIGIG",		ICL_PMC_LTR_WIGIG},
 	/* Below two cannot be used for LTR_IGNORE */
 	{"CURRENT_PLATFORM",	CNP_PMC_LTR_CUR_PLT},
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/4 platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support

In reply to David E. Box

From: Gayatri Kammela <[email protected]>

Add RocketLake to the list of the platforms that intel_pmc_core driver supports for pmc_core device. RocketLake reuses all the TigerLake PCH IPs.

Cc Srinivas Pandruvada <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc David E. Box <[email protected]>
Cc Tony Luck <[email protected]>
Cc Rui Zhang <[email protected]>
---
 drivers/platform/x86/intel_pmc_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/intel_pmc_core.c +1 -0
index d959fa698ec5..f0347ee8a4d6 100644
@@ -1155,6 +1155,7 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
 	X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE,		&tgl_reg_map),
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT,	&tgl_reg_map),
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_L,	&icl_reg_map),
+	X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE,		&tgl_reg_map),
 	{}
 };
 
Signature · 1 line
2.20.1
Reviewed-by on v1 2/4
#3 lore raw

Re: [PATCH 2/4] platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support

Quoted 5 lines · David E. Box

From: Gayatri Kammela <[email protected]>

Add RocketLake to the list of the platforms that intel_pmc_core driver supports for pmc_core device. RocketLake reuses all the TigerLake PCH IPs.

Just a nit here - I guess the convention was to leave a space in IP names such as "Tiger Lake", "Rocket Lake" like it's done in previous patches too. I am not sure whether it's a new convention but it's good to be consistent throughout the series.

Other than that, the series is:

Quoted 28 lines
Cc Srinivas Pandruvada <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc David E. Box <[email protected]>
Cc Tony Luck <[email protected]>
Cc Rui Zhang <[email protected]>
---
 drivers/platform/x86/intel_pmc_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/intel_pmc_core.c +1 -1
index d959fa698ec5..f0347ee8a4d6 100644
@@ -1155,6 +1155,7 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
        X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE,           &tgl_reg_map),
        X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT,        &tgl_reg_map),
        X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_L,      &icl_reg_map),
+       X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE,          &tgl_reg_map),
        {}
 };
 
--

2.20.1

Signature · 2 lines
Thanks,
Rajneesh
#4 lore raw

PATCH 3/4 platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with dev_info()

In reply to David E. Box

From: Gayatri Kammela <[email protected]>

dev_dbg macro is used to dump the debug registers in resume from an S0ix failure. However, when CONFIG_DYNAMIC_DEBUG is not set, the user may not be able to find the debug dump on an S0ix failure which defeats the purpose. The output of these messages is already controlled by a module parameter, warn_on_s0ix_failures, making it a 2 step process to enable anyway when CONFIG_DYNAMIC_DEBUG is set.

Hence, replace dev_dbg with dev_info, allowing the control of the messages solely through the module parameter which is N by default.

Fixes commit 913f984a8347 ("platform/x86: intel_pmc_core: Add an additional parameter to pmc_core_lpm_display()")

Cc Srinivas Pandruvada <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc David E. Box <[email protected]>
---
 drivers/platform/x86/intel_pmc_core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/intel_pmc_core.c +3 -3
index f0347ee8a4d6..a2d6f9a66428 100644
@@ -636,7 +636,7 @@ static void pmc_core_slps0_display(struct pmc_dev *pmcdev, struct device *dev,
 		offset += 4;
 		while (map->name) {
 			if (dev)
-				dev_dbg(dev, "SLP_S0_DBG: %-32s\tState: %s\n",
+				dev_info(dev, "SLP_S0_DBG: %-32s\tState: %s\n",
 					map->name,
 					data & map->bit_mask ? "Yes" : "No");
 			if (s)
@@ -679,7 +679,7 @@ static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
 
 	for (idx = 0; idx < arr_size; idx++) {
 		if (dev)
-			dev_dbg(dev, "\nLPM_%s_%d:\t0x%x\n", str, idx,
+			dev_info(dev, "\nLPM_%s_%d:\t0x%x\n", str, idx,
 				lpm_regs[idx]);
 		if (s)
 			seq_printf(s, "\nLPM_%s_%d:\t0x%x\n", str, idx,
@@ -687,7 +687,7 @@ static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
 		for (index = 0; maps[idx][index].name && index < len; index++) {
 			bit_mask = maps[idx][index].bit_mask;
 			if (dev)
-				dev_dbg(dev, "%-30s %-30d\n",
+				dev_info(dev, "%-30s %-30d\n",
 					maps[idx][index].name,
 					lpm_regs[idx] & bit_mask ? 1 : 0);
 			if (s)
Signature · 1 line
2.20.1
#5 lore raw

PATCH 4/4 MAINTAINERS: Update maintainers for pmc_core driver

In reply to David E. Box

From: Gayatri Kammela <[email protected]>

Update MAINTAINERS file for pmc_core driver to reflect the current maintainers.

---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +2 -2
index 33b27e62ce19..cd9fcea0d507 100644
@@ -8925,8 +8925,8 @@ F:	arch/x86/include/asm/intel_punit_ipc.h
 F:	drivers/platform/x86/intel_punit_ipc.c
 
 INTEL PMC CORE DRIVER
-M:	Rajneesh Bhardwaj <[email protected]>
-M:	Vishwanath Somayaji <[email protected]>
+M:	Rajneesh Bhardwaj <[email protected]>
+M:	David E Box <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	drivers/platform/x86/intel_pmc_core*
Signature · 1 line
2.20.1
Reviewed-by on the v1 series
#6 lore raw
In reply to David E. Box
Quoted 2 lines · David E. Box

Add RocketLake platform support and other driver maintainance.

Hans, Mark, this series has been internally reviewed and tested on affected hardware, I think it's ready to go for v5.10.

David, I'm not a maintainer anymore here.

Quoted 15 lines

Gayatri Kammela (4):
platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments
and reorganize
platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with

    dev_info()

MAINTAINERS: Update maintainers for pmc_core driver

 MAINTAINERS                           |  4 +--
 drivers/platform/x86/intel_pmc_core.c | 39 ++++++++++++++++-----------
 2 files changed, 26 insertions(+), 17 deletions(-)

--
2.20.1

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw
In reply to David E. Box

Hi,

Quoted 9 lines · David E. Box

Add RocketLake platform support and other driver maintainance.

Gayatri Kammela (4):
platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments
and reorganize
platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with

     dev_info()

MAINTAINERS: Update maintainers for pmc_core driver

Thank you for your patch-series, I've applied the series to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up there once I've pushed my local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans