~vicamo/+git/ubuntu-kernel:bug-1950062/i2c-pii4-mmio-accesses/jammy

Last commit made on 2022-02-15
Get this branch:
git clone -b bug-1950062/i2c-pii4-mmio-accesses/jammy https://git.launchpad.net/~vicamo/+git/ubuntu-kernel
Only You-Sheng Yang can upload to this branch. If you are You-Sheng Yang please log in for upload directions.

Branch merges

Branch information

Name:
bug-1950062/i2c-pii4-mmio-accesses/jammy
Repository:
lp:~vicamo/+git/ubuntu-kernel

Recent commits

e080beb... by You-Sheng Yang

Bug 1950062: i2c: piix4: Replace cd6h/cd7h port I/O accesses with MMIO accesses

7916677... by Terry Bowman <email address hidden>

i2c: piix4: Enable EFCH MMIO for Family 17h+

BugLink: https://bugs.launchpad.net/bugs/1950062

Enable EFCH MMIO using check for SMBus PCI revision ID value 0x51 or
greater. This PCI revision ID check will enable family 17h and future
AMD processors with the same EFCH SMBus controller HW.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit e071ee718fbc8fcd897956ad8885de5d836202cf git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

5401c6b... by Terry Bowman <email address hidden>

i2c: piix4: Add EFCH MMIO support for SMBus port select

BugLink: https://bugs.launchpad.net/bugs/1950062

AMD processors include registers capable of selecting between 2 SMBus
ports. Port selection is made during each user access by writing to
FCH::PM::DECODEEN[smbus0sel]. Change the driver to use MMIO during
SMBus port selection because cd6h/cd7h port I/O is not available on
later AMD processors.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit c57a2d28c7aba10d6701e1efdb989a0bad3428ba git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

20ebadc... by Terry Bowman <email address hidden>

i2c: piix4: Add EFCH MMIO support to SMBus base address detect

BugLink: https://bugs.launchpad.net/bugs/1950062

The EFCH SMBus controller's base address is determined using details in
FCH::PM::DECODEEN[smbusasfiobase] and FCH::PM::DECODEEN[smbusasfioen].These
register fields were accessed using cd6h/cd7h port I/O. cd6h/cd7h port I/O
is no longer available in later AMD processors. Change base address
detection to use MMIO instead of port I/O cd6h/cd7h.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit d8c60ffbfa0adfd079756631212624f7fa0a60dc git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

bf752fe... by Terry Bowman <email address hidden>

i2c: piix4: Add EFCH MMIO support to region request and release

BugLink: https://bugs.launchpad.net/bugs/1950062

EFCH cd6h/cd7h port I/O may no longer be available on later AMD
processors and it is recommended to use MMIO instead. Update the
request and release functions to support MMIO.

MMIO request/release and mmapping require details during cleanup.
Add a MMIO configuration structure containing resource and vaddress
details for mapping the region, accessing the region, and releasing
the region.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit 58d26c485c446ca71545be0aca31b584e6bf8a86 git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

770b43b... by Terry Bowman <email address hidden>

i2c: piix4: Move SMBus port selection into function

BugLink: https://bugs.launchpad.net/bugs/1950062

Move port selection code into a separate function. Refactor is in
preparation for following MMIO changes.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit d60337511711431d1ea96ff74583d4c18e3454ee git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

463c153... by Terry Bowman <email address hidden>

i2c: piix4: Move SMBus controller base address detect into function

BugLink: https://bugs.launchpad.net/bugs/1950062

Move SMBus controller base address detection into function. Refactor
is in preparation for following MMIO changes.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit 45146f16da955dfa611a05bb1d9f5d4393dd85ea git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

4a8537f... by Terry Bowman <email address hidden>

i2c: piix4: Move port I/O region request/release code into functions

BugLink: https://bugs.launchpad.net/bugs/1950062

Move duplicated region request and release code into a function. Move is
in preparation for following MMIO changes.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit e6d5f41fb5ca9c654ce442446baacdd9e42b31bd git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

05776b7... by Terry Bowman <email address hidden>

i2c: piix4: Replace hardcoded memory map size with a #define

BugLink: https://bugs.launchpad.net/bugs/1950062

Replace number constant with #define to improve readability and
maintainability.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Jean Delvare <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit 93102cb449780f7b4eecf713451627b78373ce49 git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>

d6f61b5... by Terry Bowman <email address hidden>

kernel/resource: Introduce request_mem_region_muxed()

BugLink: https://bugs.launchpad.net/bugs/1950062

Support for requesting muxed memory region is implemented but not
currently callable as a macro. Add the request muxed memory
region macro.

MMIO memory accesses can be synchronized using request_mem_region() which
is already available. This call will return failure if the resource is
busy. The 'muxed' version of this macro will handle a busy resource by
using a wait queue to retry until the resource is available.

Signed-off-by: Terry Bowman <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Signed-off-by: Wolfram Sang <email address hidden>
(cherry picked from commit 27c196c7b73cb70bbed3a9df46563bab60e63415 git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: You-Sheng Yang <email address hidden>