Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86/amd/pmc: Modify SMU message port for latest AMD platform

The latest platforms use a different SMU message port(0x938) from the one
currently being used (0x538). Make code changes to adapt to this new
information.

Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231228102104.1785383-7-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Shyam Sundar S K and committed by
Hans de Goede
236f7d80 d33e992e

+6 -3
+5 -3
drivers/platform/x86/amd/pmc/pmc.c
··· 31 31 #include "pmc.h" 32 32 33 33 /* SMU communication registers */ 34 - #define AMD_PMC_REGISTER_MESSAGE 0x538 35 34 #define AMD_PMC_REGISTER_RESPONSE 0x980 36 35 #define AMD_PMC_REGISTER_ARGUMENT 0x9BC 37 36 ··· 351 352 case AMD_CPU_ID_CB: 352 353 dev->num_ips = 12; 353 354 dev->s2d_msg_id = 0xBE; 355 + dev->smu_msg = 0x538; 354 356 break; 355 357 case AMD_CPU_ID_PS: 356 358 dev->num_ips = 21; 357 359 dev->s2d_msg_id = 0x85; 360 + dev->smu_msg = 0x538; 358 361 break; 359 362 case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: 360 363 dev->num_ips = 22; 361 364 dev->s2d_msg_id = 0xDE; 365 + dev->smu_msg = 0x938; 362 366 break; 363 367 } 364 368 } ··· 665 663 argument = AMD_S2D_REGISTER_ARGUMENT; 666 664 response = AMD_S2D_REGISTER_RESPONSE; 667 665 } else { 668 - message = AMD_PMC_REGISTER_MESSAGE; 666 + message = dev->smu_msg; 669 667 argument = AMD_PMC_REGISTER_ARGUMENT; 670 668 response = AMD_PMC_REGISTER_RESPONSE; 671 669 } ··· 692 690 argument = AMD_S2D_REGISTER_ARGUMENT; 693 691 response = AMD_S2D_REGISTER_RESPONSE; 694 692 } else { 695 - message = AMD_PMC_REGISTER_MESSAGE; 693 + message = dev->smu_msg; 696 694 argument = AMD_PMC_REGISTER_ARGUMENT; 697 695 response = AMD_PMC_REGISTER_RESPONSE; 698 696 }
+1
drivers/platform/x86/amd/pmc/pmc.h
··· 26 26 u32 dram_size; 27 27 u32 num_ips; 28 28 u32 s2d_msg_id; 29 + u32 smu_msg; 29 30 /* SMU version information */ 30 31 u8 smu_program; 31 32 u8 major;