]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
HID: amd_sfh: Use amd_get_c2p_val() to read C2P register
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Tue, 7 May 2024 07:10:45 +0000 (12:40 +0530)
committerJiri Kosina <jkosina@suse.com>
Tue, 7 May 2024 13:18:47 +0000 (15:18 +0200)
Newer processors support various MP2 register sets. Therefore, to ensure
compatibility and obtain C2P data, use the amd_get_c2p_val().

Co-developed-by: Patil Rajesh Reddy <patreddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <patreddy@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c

index 2de2668a027797b3c47de0cbfe2a0b742b753b7c..4676f060da261571162f855c022d19a1fce15ade 100644 (file)
@@ -97,7 +97,7 @@ static int amd_sfh_hpd_info(u8 *user_present)
        if (!emp2 || !emp2->dev_en.is_hpd_present)
                return -ENODEV;
 
-       hpdstatus.val = readl(emp2->mmio + AMD_C2P_MSG(4));
+       hpdstatus.val = readl(emp2->mmio + amd_get_c2p_val(emp2, 4));
        *user_present = hpdstatus.shpd.presence;
 
        return 0;