i2c: piix4: Fix SMBus port selection for AMD Family 17h chips
authorGuenter Roeck <linux@roeck-us.net>
Sat, 15 Jul 2017 23:51:26 +0000 (16:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2017 08:38:07 +0000 (10:38 +0200)
commit717ef37dde6c3b45a1f20f0e709e4fc8e9396e49
tree23eda01b7f362fddaa922b0d80d931d8b4b2a9d3
parent4d4f527029e290d8e67703409518af9b4a71edb1
i2c: piix4: Fix SMBus port selection for AMD Family 17h chips

commit 0fe16195f89173652cf111d7b384941b00c5aabd upstream.

AMD Family 17h uses the KERNCZ SMBus controller. While its documentation
is not publicly available, it is documented in the BIOS and Kernel
Developer’s Guide for AMD Family 15h Models 60h-6Fh Processors.

On this SMBus controller, the port select register is at PMx register
0x02, bit 4:3 (PMx00 register bit 20:19).

Without this patch, the 4 SMBus channels on AMD Family 17h chips are
mirrored and report the same chips on all channels.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-piix4.c