From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30C4AC10F13 for ; Thu, 11 Apr 2019 19:32:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2F76206BA for ; Thu, 11 Apr 2019 19:32:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YUkPbpJX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="blQLHqQv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2F76206BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0BSatkvXa0md9sSM+Kvks/jdCDkwkVrd5ESlNKRrVhs=; b=YUkPbpJX6Xwxbn n4esn0oZ2ay4JeEPQYi5PlMtv4k88N+cfwS2vRaDclzHeCq2QtJW1bM1cGNB4xcEoQ2sS+uAXPf1S 9Tm7mIsDz6haEbTlLmXXfQRQ2gi1u42DzX6eAA8vo/9GfHDfphNU0SyKPOPLlg0WW/h8sh3TuDZuW Qm+8aiVFkUZSCQeslXTr4gnP1kgfmbFg0MUfMfv6hb882568A5IxcZaUTPxuwGZJZWidbtUPhUul0 3L0HEktwojYN05kzlF1R4SCPq3Ek/ouyBIjbVbW6OrzE/bBhZEQhq52IJtgjX9Z6ukVRGHdty9BMZ pWFvNmNdme+rrG5sAkUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEfRM-0005b8-9N; Thu, 11 Apr 2019 19:32:52 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEfRI-0005am-Lv for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2019 19:32:50 +0000 Received: by mail-pf1-x442.google.com with SMTP id 188so3921127pfd.8 for ; Thu, 11 Apr 2019 12:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9XE1ib70CTBCSJF1AkKgPieTl/mYKPumX5XUQ7K4E/8=; b=blQLHqQvBq+O9L7KTuFQmZM9goy3qi59JqpJZbwpVdgiR3SMu+6lN57yOukdqz4F8D xJf4JUg9SSeQXENYohhFqAAkisUKl+3iVl49Qis/Ys61zlraymssdk9KGlP3LJAbZ1sq IvMtfdlrb0Xg+sFMQwnfo30tRtcVxJf6X7i7vawICEeffjaq0yL6BNw+sjgNVIxicG/j gLGQRLQIojp2m686esB1GgBx+9KlcPhvVJy9l8z/VQ3AxCO2Zh8ZENht15OBhkeumh1v kXQUT5hVoOPUpG0UYMb1RBxQmxWomVf8vBOCuEQOd941wLQu+4g3bM4iKj+9oJqBq7ta Xzzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=9XE1ib70CTBCSJF1AkKgPieTl/mYKPumX5XUQ7K4E/8=; b=QT1A/hbYmgs7XH2haQjYQxrpORDcijQwsfNyLEHhCKUpR3f27KgJ8VNap15WnUskLJ BH+0EhGrjp4ZhDfMR2w+7BkwovEJf8foQ6+D4vkz/+dG+UQerX7KDZCZxLN5WLZvNdNV UmnOA6dV180wle0s3XJrn4Zb9Iru/FHBpc9rJr1gdTjiU8wn8N8NBDagQsYmhFtAJxGb rUkvuilfa93bSgWJTFGH6ZStTyQELrhCgsUc0yq1DTgGGpNrLpeWNyHqG7jWfcnaCQMK +xxZ0FpJC3EkL3E5xXCw7d3lOz0yxfs+96qboTQQr/wSnJY+t4kouN5IzwxLwO6QbNpJ Br4Q== X-Gm-Message-State: APjAAAV/stOfuxVO4xdCBIL5bLXmn8rKvjKT0Iws+iUeUiAK9pRnfAoq YrdtDysklNmfe09zdqsRVbY= X-Google-Smtp-Source: APXvYqy6Ba4+foRyMZv/a7l+tqCVbPsa5UFcKncFOYADaM0FY91MvYHXO5TZJ2w+iM0JLp2db86zoA== X-Received: by 2002:aa7:8252:: with SMTP id e18mr51335183pfn.105.1555011167940; Thu, 11 Apr 2019 12:32:47 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id s12sm63433920pgc.28.2019.04.11.12.32.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 12:32:46 -0700 (PDT) Date: Thu, 11 Apr 2019 12:32:45 -0700 From: Guenter Roeck To: Alexandre Belloni Subject: Re: [PATCH v2] watchdog: pnx4008: readout watchdog state Message-ID: <20190411193245.GA1742@roeck-us.net> References: <20190411191437.12173-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190411191437.12173-1-alexandre.belloni@bootlin.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190411_123248_742754_CAF4851F X-CRM114-Status: GOOD ( 17.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-watchdog@vger.kernel.org, Gregory Clement , linux-kernel@vger.kernel.org, Vladimir Zapolskiy , Sylvain Lemieux , Wim Van Sebroeck , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 11, 2019 at 09:14:37PM +0200, Alexandre Belloni wrote: > Readout the enabled state so it is possible to get the pre-userspace > handler working. Also, avoid disabling the watchdog to ensure it continues > working and triggers if there is an issue later in the boot or if userspace > fails to start. > > Signed-off-by: Alexandre Belloni Reviewed-by: Guenter Roeck > --- > drivers/watchdog/pnx4008_wdt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c > index 8e261799c84e..4ce0389d1442 100644 > --- a/drivers/watchdog/pnx4008_wdt.c > +++ b/drivers/watchdog/pnx4008_wdt.c > @@ -209,7 +209,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) > watchdog_set_nowayout(&pnx4008_wdd, nowayout); > watchdog_set_restart_priority(&pnx4008_wdd, 128); > > - pnx4008_wdt_stop(&pnx4008_wdd); /* disable for now */ > + if (readl(WDTIM_CTRL(wdt_base)) & COUNT_ENAB) > + set_bit(WDOG_HW_RUNNING, &pnx4008_wdd.status); > > ret = watchdog_register_device(&pnx4008_wdd); > if (ret < 0) { > -- > 2.20.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel