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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55975C433F5 for ; Tue, 30 Nov 2021 20:57:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343895AbhK3VAE (ORCPT ); Tue, 30 Nov 2021 16:00:04 -0500 Received: from soltyk.jannau.net ([144.76.91.90]:49970 "EHLO soltyk.jannau.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343817AbhK3U7F (ORCPT ); Tue, 30 Nov 2021 15:59:05 -0500 Received: by soltyk.jannau.net (Postfix, from userid 1000) id 5C4AB261BA6; Tue, 30 Nov 2021 21:55:28 +0100 (CET) Date: Tue, 30 Nov 2021 21:55:28 +0100 From: Janne Grunau To: Sven Peter Cc: Wim Van Sebroeck , Guenter Roeck , Hector Martin , Alyssa Rosenzweig , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/2] watchdog: Add Apple SoC watchdog driver Message-ID: <20211130205528.GC28130@jannau.net> References: <20211130161809.64591-1-sven@svenpeter.dev> <20211130161809.64591-2-sven@svenpeter.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211130161809.64591-2-sven@svenpeter.dev> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hej, On 2021-11-30 17:18:09 +0100, Sven Peter wrote: > Add support for the watchdog timer found in Apple SoCs. This driver is > also required to reboot these machines. > > Signed-off-by: Sven Peter > --- > v1 -> v2: > - set the default timeout to 30s and call watchdog_init_timeout > to allow the device tree to override it > - set WDOG_HW_RUNNING if the watchdog is enabled at boot > - check that the clock rate is not zero > - use unsigned long instead of u32 for clk_rate > - use devm_add_action_or_reset instead of manually calling > clk_disable_unprepare > - explain the magic number in apple_wdt_restart > > MAINTAINERS | 1 + > drivers/watchdog/Kconfig | 12 ++ > drivers/watchdog/Makefile | 1 + > drivers/watchdog/apple_wdt.c | 226 +++++++++++++++++++++++++++++++++++ > 4 files changed, 240 insertions(+) > create mode 100644 drivers/watchdog/apple_wdt.c Tested on M1 and M1 Max. Feel free to add Tested-by: Janne Grunau best Janne 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BCD9FC433EF for ; Tue, 30 Nov 2021 20:56:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=ptZF540E+X6ZQlsA7+lp15g+ZZUStdWn7OvD1KvCx/0=; b=EE7v1y9AWhGV+e djw3dqnBb57K4yPD2mwNT2TKiTjc4mcqhwMJGMqhM4+ONehFSZq5LCOSBxDMsG0iKAaHhtf6Ca23x Zh+knr/L8dvGXr5KoipAhxyxG1TQKQDjB9eqC7RFpHP8n814c9sIm7QAOov+GqBUvjFAACZNXMKpm JygahM1Z4+GuTt0pb2Q6HW9+j1ULnmFs0LeeO3CLJIyK+kRNuT8Q9XTYYwkc02IGw/jIivuCMenp7 CdgkK2gD1FHVhAIz8rUQhDEuBEUxwtOLuWxM5N5YkRTQtIC16nmmcvapGEnkd0nMZ8SReFa/okAq2 aHNdBXVDj8ZdKLmlTAXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msAA3-006h7C-V9; Tue, 30 Nov 2021 20:55:36 +0000 Received: from soltyk.jannau.net ([144.76.91.90]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msAA0-006h6J-CS for linux-arm-kernel@lists.infradead.org; Tue, 30 Nov 2021 20:55:33 +0000 Received: by soltyk.jannau.net (Postfix, from userid 1000) id 5C4AB261BA6; Tue, 30 Nov 2021 21:55:28 +0100 (CET) Date: Tue, 30 Nov 2021 21:55:28 +0100 From: Janne Grunau To: Sven Peter Cc: Wim Van Sebroeck , Guenter Roeck , Hector Martin , Alyssa Rosenzweig , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/2] watchdog: Add Apple SoC watchdog driver Message-ID: <20211130205528.GC28130@jannau.net> References: <20211130161809.64591-1-sven@svenpeter.dev> <20211130161809.64591-2-sven@svenpeter.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211130161809.64591-2-sven@svenpeter.dev> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_125532_615741_D3650DA0 X-CRM114-Status: GOOD ( 17.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hej, On 2021-11-30 17:18:09 +0100, Sven Peter wrote: > Add support for the watchdog timer found in Apple SoCs. This driver is > also required to reboot these machines. > > Signed-off-by: Sven Peter > --- > v1 -> v2: > - set the default timeout to 30s and call watchdog_init_timeout > to allow the device tree to override it > - set WDOG_HW_RUNNING if the watchdog is enabled at boot > - check that the clock rate is not zero > - use unsigned long instead of u32 for clk_rate > - use devm_add_action_or_reset instead of manually calling > clk_disable_unprepare > - explain the magic number in apple_wdt_restart > > MAINTAINERS | 1 + > drivers/watchdog/Kconfig | 12 ++ > drivers/watchdog/Makefile | 1 + > drivers/watchdog/apple_wdt.c | 226 +++++++++++++++++++++++++++++++++++ > 4 files changed, 240 insertions(+) > create mode 100644 drivers/watchdog/apple_wdt.c Tested on M1 and M1 Max. Feel free to add Tested-by: Janne Grunau best Janne _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel