From patchwork Wed Jun 23 02:44:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Art Nikpal X-Patchwork-Id: 466215 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 3AE9BC2B9F4 for ; Wed, 23 Jun 2021 02:45:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24F0E60E0B for ; Wed, 23 Jun 2021 02:45:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbhFWCrX (ORCPT ); Tue, 22 Jun 2021 22:47:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbhFWCrX (ORCPT ); Tue, 22 Jun 2021 22:47:23 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0711C061574; Tue, 22 Jun 2021 19:45:06 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id p4-20020a17090a9304b029016f3020d867so468470pjo.3; Tue, 22 Jun 2021 19:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nG+pOWS0M1Gfo+8ACN/8exbFFB4o94YMeK4YKBZapj4=; b=cpNOD0m8KCln4XWBzXCOomTryHpX4+7fjUmu0naJBD3pDivMn28fjGbIoG1Mn0HDgw pkNRXwmd1ybS9wi50MtXc/hkARPDVFEDPYwGd9R4t/XL3vgAYxuN/rNlK5blPGCYGcrv c5BCCL71L/3wEu+IG4/DP8T7ssl1eYgMmqcYnCZ2tjj1DoxFKckRpcN2DV8A6Iu00wBJ 88BJQPkjQUUg8gp48SB0rv8i7EttqSqJACftm8rpCbpkZS5RbL8TaLzcS05aAFgwMrqA ZC07hHSJZ3LYRi2KUXpWBYtjcoi7hZ29Javr2hCakL6Pi0exeew9ok2WUjte9b97tsbr ccjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nG+pOWS0M1Gfo+8ACN/8exbFFB4o94YMeK4YKBZapj4=; b=Zjx5EMRWZjYnOPSatYNgAeJy56JhN9ttcjQbBnHo9+sTAcIfMI004ZJy0eZ9sD2ZFm O4nehIpTaUf3lDMkPdnTJuXTc7Nqq+wD33X4XmCiC/LQg7iEEMeKz6WAoXSRYSLnr7Tn 2mlO9PLLIAvHBYOZq54qIRlxjQ6Ox2IBskZ6pisW3sqpv2SgWkUgaFUvt6FfFXbG6FJK Wbz7tokq8rWsZK0Qsord+CEdpW8WxcBcxU8z/SQf3F+86sZPrmdpDBtIoTkW1OewiHir 0HoRp+r7E1A8XIDGG4WzcbCL7Paxljeq4vDB2aQyUH2ACDeeUMQNFRB2qDcqF0r8/Lr7 skOg== X-Gm-Message-State: AOAM533PziM1fcdUH/11kumwccZxjz4mCNKzvic3iMIB7kF3sR+KkucT PYGUlg1yeDwtl+OkN65vOIU= X-Google-Smtp-Source: ABdhPJwsLQJvoBHZ3TUXW9rr+r5o9aPuwYapZ4TRZKG3aXcbL73IaxtwdfygcLWNOILymoz7XNoxeA== X-Received: by 2002:a17:903:31d3:b029:ee:bccd:e686 with SMTP id v19-20020a17090331d3b02900eebccde686mr25856408ple.1.1624416306583; Tue, 22 Jun 2021 19:45:06 -0700 (PDT) Received: from localhost.localdomain (104.194.74.249.16clouds.com. [104.194.74.249]) by smtp.gmail.com with ESMTPSA id z17sm556307pfq.218.2021.06.22.19.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 19:45:06 -0700 (PDT) From: Artem Lapkin X-Google-Original-From: Artem Lapkin To: narmstrong@baylibre.com Cc: wim@linux-watchdog.org, linux@roeck-us.net, khilman@baylibre.com, jbrunet@baylibre.com, christianshewitt@gmail.com, martin.blumenstingl@googlemail.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, art@khadas.com, nick@khadas.com, gouwa@khadas.com Subject: [PATCH 2/5] watchdog: meson_gxbb_wdt: add timeout module param Date: Wed, 23 Jun 2021 10:44:26 +0800 Message-Id: <20210623024429.1346349-3-art@khadas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210623024429.1346349-1-art@khadas.com> References: <20210623024429.1346349-1-art@khadas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Added timeout module param same as in other modules Signed-off-by: Artem Lapkin --- drivers/watchdog/meson_gxbb_wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c index 3f86530c33b0..ecd1fc6f48ba 100644 --- a/drivers/watchdog/meson_gxbb_wdt.c +++ b/drivers/watchdog/meson_gxbb_wdt.c @@ -29,6 +29,11 @@ #define GXBB_WDT_TCNT_SETUP_MASK (BIT(16) - 1) #define GXBB_WDT_TCNT_CNT_SHIFT 16 +static unsigned int timeout = DEFAULT_TIMEOUT; +module_param(timeout, uint, 0); +MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds=" + __MODULE_STRING(DEFAULT_TIMEOUT) ")"); + struct meson_gxbb_wdt { void __iomem *reg_base; struct watchdog_device wdt_dev; @@ -174,7 +179,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev) data->wdt_dev.ops = &meson_gxbb_wdt_ops; data->wdt_dev.max_hw_heartbeat_ms = GXBB_WDT_TCNT_SETUP_MASK; data->wdt_dev.min_timeout = 1; - data->wdt_dev.timeout = DEFAULT_TIMEOUT; + data->wdt_dev.timeout = timeout; watchdog_set_drvdata(&data->wdt_dev, data); /* Setup with 1ms timebase */ From patchwork Wed Jun 23 02:44:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Art Nikpal X-Patchwork-Id: 466214 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 DF3B2C2B9F4 for ; Wed, 23 Jun 2021 02:45:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C90516128C for ; Wed, 23 Jun 2021 02:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbhFWCrf (ORCPT ); Tue, 22 Jun 2021 22:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230454AbhFWCrf (ORCPT ); Tue, 22 Jun 2021 22:47:35 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F3FCC061574; Tue, 22 Jun 2021 19:45:18 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id g24so636781pji.4; Tue, 22 Jun 2021 19:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ip7ajlGeYj7m17iAVH4CDZ+K9tw9hchuXGcTy/Lm6iQ=; b=ZLHfABsqlgyddU1GXYU9y5z08Y+mthiwFyIpXRHJYRuxFLzMQ87pEBVg79j10WS2qY FiShyYhNhx8+VW+95/cNH4rGhSuBAAmbdjA6dutHC2p26uj1ug1lutM/V+BNia93oByg 2FGz4R/kGqk37obq3lHyBVkQg0JD87lvKHgLfCUapD4yrMv0vctofqM31YhBXVCl8tUB pE9sgqKfduGMzqYg6xtrA5J/bH3d6yCwI33BoDzoMOb42bDmByANRj3A9Zh0sKu9MQBY GnVMrXqqaoxd+vdiW1PWVLvjFpWn8V+yrQUV72n3YSzP3UI5g7C+5OfNRbD+xPsMCWGM 6Znw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ip7ajlGeYj7m17iAVH4CDZ+K9tw9hchuXGcTy/Lm6iQ=; b=pR2G7/c4S4+u6OlTDRnLB74dGdMCl+w9M/0XU/LsKVQpM1Hb8PaIbma2WkweZ6Bptw Ohhi3A9/3DqMe/Jg+ZoWazjeFHv+5LxyP78vlHg47MGu8pvvMYxUOQW2MbS2odw3FErx 9BhNACzs1qz0XTmZG8nNcNV/DX8T9cmT6PmwYu3qx5VLoQDkxDvzliZdFYc2yTckKHnP Nhjd/Rxp57E6L+yxCbomD2Rb0W1kPElfB+0zsck7vk9LmG+qEj+LM0wI6013qGq4Z1py rqalGuy3SPVTHtxYjRgHQLGJu9LUexkHPePt2R1DCwTujr0ujG6MZ2NxGzCiOOZ25WXN N1lA== X-Gm-Message-State: AOAM533S43QW4ACN4O8ZFWzqj9Ygdq09XLNycW2YGUdQVNc9b6Vbd7Nh 9HsZ7fw466gnGYCePC+z4fM= X-Google-Smtp-Source: ABdhPJyhCZwjN/m4vhnNitMbn91dSnkTedliyYAJ/e5+IN8eggGCWtWL3XZgZhB48Y3cBOXQ/yZ8uw== X-Received: by 2002:a17:90a:c8b:: with SMTP id v11mr7062600pja.114.1624416318293; Tue, 22 Jun 2021 19:45:18 -0700 (PDT) Received: from localhost.localdomain (104.194.74.249.16clouds.com. [104.194.74.249]) by smtp.gmail.com with ESMTPSA id z17sm556307pfq.218.2021.06.22.19.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 19:45:18 -0700 (PDT) From: Artem Lapkin X-Google-Original-From: Artem Lapkin To: narmstrong@baylibre.com Cc: wim@linux-watchdog.org, linux@roeck-us.net, khilman@baylibre.com, jbrunet@baylibre.com, christianshewitt@gmail.com, martin.blumenstingl@googlemail.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, art@khadas.com, nick@khadas.com, gouwa@khadas.com Subject: [PATCH 4/5] watchdog: meson_gxbb_wdt: add stop_on_unregister Date: Wed, 23 Jun 2021 10:44:28 +0800 Message-Id: <20210623024429.1346349-5-art@khadas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210623024429.1346349-1-art@khadas.com> References: <20210623024429.1346349-1-art@khadas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Added missed watchdog_stop_on_unregister call Signed-off-by: Artem Lapkin --- drivers/watchdog/meson_gxbb_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c index 0bf5dccf70b1..2dbe254e5122 100644 --- a/drivers/watchdog/meson_gxbb_wdt.c +++ b/drivers/watchdog/meson_gxbb_wdt.c @@ -196,6 +196,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev) meson_gxbb_wdt_set_timeout(&data->wdt_dev, data->wdt_dev.timeout); watchdog_set_nowayout(&data->wdt_dev, nowayout); + watchdog_stop_on_unregister(&data->wdt_dev); return devm_watchdog_register_device(dev, &data->wdt_dev); }