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>
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>
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>
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>
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>