linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Terry Bowman <terry.bowman@amd.com>
To: <linux-watchdog@vger.kernel.org>
Cc: <terry.bowman@amd.com>, <rrichter@amd.com>,
	<linux-kernel@vger.kernel.org>, <wim@linux-watchdog.org>,
	<linux@roeck-us.net>, <ssg.sos.patches@amd.com>,
	<sudheesh.mavila@amd.com>
Subject: [PATCH v2 0/4] Watchdog: sp5100_tco: Replace watchdog cd6h/cd7h port I/O accesses with MMIO accesses
Date: Wed, 3 Nov 2021 11:15:17 -0500	[thread overview]
Message-ID: <20211103161521.43447-1-terry.bowman@amd.com> (raw)

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@amd.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
To: linux-watchdog@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Robert Richter <rrichter@amd.com>

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


             reply	other threads:[~2021-11-03 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 16:15 Terry Bowman [this message]
2021-11-03 16:15 ` [PATCH v2 1/4] Watchdog: sp5100_tco: Move timer initialization into function Terry Bowman
2021-11-03 16:15 ` [PATCH v2 2/4] Watchdog: sp5100_tco: Refactor MMIO base address initialization Terry Bowman
2021-11-03 16:15 ` [PATCH v2 3/4] Watchdog: sp5100_tco: Add EFCH SMBus controller initialization using MMIO Terry Bowman
2022-01-06 18:07   ` Guenter Roeck
2022-01-06 18:18   ` Guenter Roeck
2022-01-06 19:07     ` Terry Bowman
2022-01-07 11:05       ` Robert Richter
2022-01-07 17:12         ` Guenter Roeck
2022-01-10  9:22           ` Robert Richter
2021-11-03 16:15 ` [PATCH v2 4/4] Watchdog: sp5100_tco: Enable Family 17h+ CPUs Terry Bowman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211103161521.43447-1-terry.bowman@amd.com \
    --to=terry.bowman@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rrichter@amd.com \
    --cc=ssg.sos.patches@amd.com \
    --cc=sudheesh.mavila@amd.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).