Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1238374pxk; Thu, 10 Sep 2020 10:17:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhbrFUxjeMq/kPmcwu8Q390j1bz0qD6RKH5cbDpisWVhmWm7gWM5x3qesu71jdEnZvPoWU X-Received: by 2002:a17:906:24d2:: with SMTP id f18mr9688294ejb.510.1599758259643; Thu, 10 Sep 2020 10:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599758259; cv=none; d=google.com; s=arc-20160816; b=RuNLm0gtNUunozAhO+RUX8PCgZSKwf0GbaHcTMXdLAfRmE3R7Mcrd574zPIPSrBJnd 4wlFj1gD4seWGIb9wasTl/bL7syo0uTDY0xUOx9OXiB4byPk5SK7BR5ZkhM+qZrbTeCM +PCmC3+ipntQ5MYyN4dPC8n7vcPEDAidCF4BKgGbaaFepNhRJ6PS3yMbsAE+Vi9jDJHS L0p3zFPj8HN3Mt5GZ9oW9aBcygjI46ED+Xu9vqPwu9ssf0ahHBgyVcdPxHuYnFsvx5my /GUf3Yi6IaQB8U9IuXMk2JP7BkHNL9Ya6kV430qz5Vy3R4kR2dyh3ScIeK2PpT5QAPOP BzyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YmwgD6gvMXUBegW1bk9m61o/gh/RHgbCSZIbDaVv/CY=; b=bMbugW4iX6HceUKqfObN8Jcs3F9k1A0405a6EByC59itYxw5iaOYKnbmRfjdulXo60 d+skFf1V0QD4PGL3ifsiUdRfjDFxvb7eU+aKsuQymp/X+3qLgNRDcTrQ+4FIuM+/x+rz ngUkaih7PGJWiorYNQjlE1NLkjAQJjlJh7Us5PX56HKV+jxxrzjgHcaSMypZK/5y4VyN zu7JpQflZoT5sWJuTzGlOqXXLapx7eF2vKDlqscY8YOwA1mEBiIzQoC0Pv0sNm0x0ia2 GDNjMsEbgqASFbSjy/UPov9x/pZ6H5/Tynxlw2HZgywK3BTNBLLTs89IuTNloKNGH5+Q maDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci4si4162881ejb.290.2020.09.10.10.17.15; Thu, 10 Sep 2020 10:17:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726932AbgIJQgf (ORCPT + 99 others); Thu, 10 Sep 2020 12:36:35 -0400 Received: from david.siemens.de ([192.35.17.14]:48028 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726815AbgIJQf3 (ORCPT ); Thu, 10 Sep 2020 12:35:29 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 08AGYi4i021379 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Sep 2020 18:34:45 +0200 Received: from [139.25.68.37] ([139.25.68.37]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 08AGYiq1020550; Thu, 10 Sep 2020 18:34:44 +0200 Subject: Re: [PATCH 2/2] watchdog: sp5100_tco: Enable watchdog on Family 17h devices if disabled To: Guenter Roeck , Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200910163109.235136-1-linux@roeck-us.net> <20200910163109.235136-2-linux@roeck-us.net> From: Jan Kiszka Message-ID: <30f69c2c-d4c8-a143-6bfa-34394b6361cf@siemens.com> Date: Thu, 10 Sep 2020 18:34:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200910163109.235136-2-linux@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10.09.20 18:31, Guenter Roeck wrote: > On Family 17h (Ryzen) devices, the WatchdogTmrEn bit of PmDecodeEn not only > enables watchdog memory decoding at 0xfeb00000, it also enables the > watchdog hardware itself. Use this information to enable the watchdog if > it is not already enabled. > > Cc: Jan Kiszka > Signed-off-by: Guenter Roeck > --- > drivers/watchdog/sp5100_tco.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c > index 85e9664318c9..a730ecbf78cd 100644 > --- a/drivers/watchdog/sp5100_tco.c > +++ b/drivers/watchdog/sp5100_tco.c > @@ -17,6 +17,12 @@ > * AMD Publication 51192 "AMD Bolton FCH Register Reference Guide" > * AMD Publication 52740 "BIOS and Kernel Developer’s Guide (BKDG) > * for AMD Family 16h Models 30h-3Fh Processors" > + * AMD Publication 55570-B1-PUB "Processor Programming Reference (PPR) > + * for AMD Family 17h Model 18h, Revision B1 > + * Processors (PUB) > + * AMD Publication 55772-A1-PUB "Processor Programming Reference (PPR) > + * for AMD Family 17h Model 20h, Revision A1 > + * Processors (PUB) > */ > > /* > @@ -241,6 +247,18 @@ static int sp5100_tco_setupdevice(struct device *dev, > break; > case efch: > dev_name = SB800_DEVNAME; > + /* > + * On Family 17h devices, the EFCH_PM_DECODEEN_WDT_TMREN bit of > + * EFCH_PM_DECODEEN not only enables the EFCH_PM_WDT_ADDR memory > + * region, it also enables the watchdog itself. > + */ > + if (boot_cpu_data.x86 == 0x17) { > + val = sp5100_tco_read_pm_reg8(EFCH_PM_DECODEEN); > + if (!(val & EFCH_PM_DECODEEN_WDT_TMREN)) { > + sp5100_tco_update_pm_reg8(EFCH_PM_DECODEEN, 0xff, > + EFCH_PM_DECODEEN_WDT_TMREN); > + } > + } > val = sp5100_tco_read_pm_reg8(EFCH_PM_DECODEEN); > if (val & EFCH_PM_DECODEEN_WDT_TMREN) > mmio_addr = EFCH_PM_WDT_ADDR; > Won't that bring us EFCH_PM_WDT_ADDR as address, rather than EFCH_PM_ACPI_MMIO_ADDR which worked in my case? Or is one an alias of the other. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux