X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH v1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform
@ 2024-07-18 15:01 Shyam Sundar S K
  2024-07-18 15:03 ` Ilpo Järvinen
  2024-07-30 12:47 ` Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Shyam Sundar S K @ 2024-07-18 15:01 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen
  Cc: Sanket.Goswami, platform-driver-x86, Shyam Sundar S K

To initiate the HW deep state transistion the OS_HINT command has to be
sent to the PMFW. Add this support to the platforms that belong to family
1Ah model 60h series.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/platform/x86/amd/pmc/pmc.c | 2 ++
 drivers/platform/x86/amd/pmc/pmc.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index a3d881f6e5d9..c3e51f0a5c33 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -764,6 +764,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
 	case AMD_CPU_ID_CB:
 	case AMD_CPU_ID_PS:
 	case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+	case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
 		return MSG_OS_HINT_RN;
 	}
 	return -EINVAL;
@@ -967,6 +968,7 @@ static const struct pci_device_id pmc_pci_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
 	{ }
 };
 
diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h
index 9e32d3128c3a..f1166d15c856 100644
--- a/drivers/platform/x86/amd/pmc/pmc.h
+++ b/drivers/platform/x86/amd/pmc/pmc.h
@@ -67,6 +67,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);
 #define AMD_CPU_ID_PS			0x14E8
 #define AMD_CPU_ID_SP			0x14A4
 #define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
+#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
 #define PCI_DEVICE_ID_AMD_MP2_STB	0x172c
 
 #endif /* PMC_H */
-- 
2.25.1


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

* Re: [PATCH v1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform
  2024-07-18 15:01 [PATCH v1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform Shyam Sundar S K
@ 2024-07-18 15:03 ` Ilpo Järvinen
  2024-07-30 12:47 ` Ilpo Järvinen
  1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2024-07-18 15:03 UTC (permalink / raw)
  To: Shyam Sundar S K; +Cc: Hans de Goede, Sanket.Goswami, platform-driver-x86

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

On Thu, 18 Jul 2024, Shyam Sundar S K wrote:

> To initiate the HW deep state transistion the OS_HINT command has to be
> sent to the PMFW. Add this support to the platforms that belong to family
> 1Ah model 60h series.
> 
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.


> ---
>  drivers/platform/x86/amd/pmc/pmc.c | 2 ++
>  drivers/platform/x86/amd/pmc/pmc.h | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
> index a3d881f6e5d9..c3e51f0a5c33 100644
> --- a/drivers/platform/x86/amd/pmc/pmc.c
> +++ b/drivers/platform/x86/amd/pmc/pmc.c
> @@ -764,6 +764,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
>  	case AMD_CPU_ID_CB:
>  	case AMD_CPU_ID_PS:
>  	case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
> +	case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
>  		return MSG_OS_HINT_RN;
>  	}
>  	return -EINVAL;
> @@ -967,6 +968,7 @@ static const struct pci_device_id pmc_pci_ids[] = {
>  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
>  	{ }
>  };
>  
> diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h
> index 9e32d3128c3a..f1166d15c856 100644
> --- a/drivers/platform/x86/amd/pmc/pmc.h
> +++ b/drivers/platform/x86/amd/pmc/pmc.h
> @@ -67,6 +67,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);
>  #define AMD_CPU_ID_PS			0x14E8
>  #define AMD_CPU_ID_SP			0x14A4
>  #define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
> +#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
>  #define PCI_DEVICE_ID_AMD_MP2_STB	0x172c
>  
>  #endif /* PMC_H */
> 

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

* Re: [PATCH v1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform
  2024-07-18 15:01 [PATCH v1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform Shyam Sundar S K
  2024-07-18 15:03 ` Ilpo Järvinen
@ 2024-07-30 12:47 ` Ilpo Järvinen
  1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2024-07-30 12:47 UTC (permalink / raw)
  To: hdegoede, Shyam Sundar S K; +Cc: Sanket.Goswami, platform-driver-x86

On Thu, 18 Jul 2024 20:31:19 +0530, Shyam Sundar S K wrote:

> To initiate the HW deep state transistion the OS_HINT command has to be
> sent to the PMFW. Add this support to the platforms that belong to family
> 1Ah model 60h series.
> 
> 


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform
      commit: 426463d94d45d37c233e480231a40b9b35f10e49

--
 i.


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

end of thread, other threads:[~2024-07-30 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-18 15:01 [PATCH v1] platform/x86/amd/pmc: Send OS_HINT command for new AMD platform Shyam Sundar S K
2024-07-18 15:03 ` Ilpo Järvinen
2024-07-30 12:47 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox