Use MMIO instead of cd6h/cd7h port I/O during EFCH watchdog initialization. EFCH cd6h/cd7h PIO can be disabled and the recommended workaround is to use MMIO. As a result MMIO will be used for EFCH SMBus controller address discovery and starting the EFCH watchdog timer. Update EFCH detection to support future AMD processors. This will support new AMD processors without requiring driver modifications. Patch details: The first patch refactors watchdog timer initialization into a separate function. This is needed for future patches. New functional changes are not added. The second patch splits out existing memory reservation and address mapping into new functions. New functional changes are not added. The third patch introduces EFCH initialization using MMIO. This is required because cd6h/cd7h port I/O can be disabled on recent AMD hardware. The fourth patch adds SMBus controller PCI ID check to enable EFCH MMIO initialization. This eliminates the need for driver updates to support future processors supporting the same EFCH functionality. Testing: Tested on AMD Fam17h and Fam19h processors using: cat >> /dev/watchdog Terry Bowman (4): Watchdog: sp5100_tco: Move timer initialization into function Watchdog: sp5100_tco: Refactor MMIO base address initialization Watchdog: sp5100_tco: Add EFCH SMBus controller initialization using MMIO Watchdog: sp5100_tco: Enable Family 17h+ CPUs drivers/watchdog/sp5100_tco.c | 360 +++++++++++++++++++++++----------- drivers/watchdog/sp5100_tco.h | 6 + 2 files changed, 251 insertions(+), 115 deletions(-) Co-developed-by: Robert Richter <rrichter@xxxxxxx> Signed-off-by: Robert Richter <rrichter@xxxxxxx> Signed-off-by: Terry Bowman <terry.bowman@xxxxxxx> To: linux-watchdog@xxxxxxxxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx Cc: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx> Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Robert Richter <rrichter@xxxxxxx> Changes in V2: - Refactor into 4 patch series - Move MMIO reservation and mapping into helper functions - Combine mmio_addr and alternate mmio_addr base address discovery - Replace efch_use_mmio() with efch_mmio layout type -- 2.25.1