Message ID | 20220816043643.26569-7-alice.guo@oss.nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-watchdog-owner@kernel.org> 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 4FD4FC3F6B0 for <linux-watchdog@archiver.kernel.org>; Tue, 16 Aug 2022 07:10:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbiHPHKG (ORCPT <rfc822;linux-watchdog@archiver.kernel.org>); Tue, 16 Aug 2022 03:10:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231793AbiHPHJm (ORCPT <rfc822;linux-watchdog@vger.kernel.org>); Tue, 16 Aug 2022 03:09:42 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7112F388E11; Mon, 15 Aug 2022 21:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W6RjiUr50TrAunoquwR3lNAH1o/UPVlZojuxRetRbVaDWFXyqXp8Ha/9zqQytFa85zG4LDpjypnprtBgrYOnebWNa7XvwS8hjGX508HXfhw+pMnIuEanxqjLVsXJ3QBfkWA8y9NyHNU82UCNPPznWjHqXoPYia4wQkKqEOZV/l60YDhb5YGcnLNYixHnnjcWTEBcoDsGwBT3jZ8lJuX6a/FQUB3UxtK/Z4u4zrXSuWGysMktQGwShJ3kDlsRBxCp4c/SfC65Qh5i5mBA8ZNSFueiJ/MerlWyzvhrpxI7/pAMMIFd8EGlOGBhiIp/0ZZUKqQSjXq3e5Ln/+uJFyJhsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HN7RZu25ghqhBP/V91DHU17DP4GGuZaqlXLciTMYaKY=; b=F4BRMIh/o0+QsKDtf9cOLtg++GbrEdQ2ZVKhfn9MZhEZdKT3yDRTUGVIJrbs2axz9TKXa4rqVYbNd1LBCE6vV1K4N+qrVqUuIvDYa/JJdwYXwZyr0l+3V7U4snT3wZhGImfHC/Z0BiUddBL2+LNfe3ts0Yv1Us8ME46oDT7hQdImmQ5O3ksGkRQsLYmxbgs4lSs6g5uaWigIobfZ+AhdErLsRN6gQtVGq3ILekR2F62OM7ja5cdtQkCp6JpfqxECkR9aoTw7bT+Mv5Caistr/RTmVa/jvX/3EpNorgSVZGequjyf6QnWMv3jd6EkdUKOFkoKHsnA/2MLJoWr7pV7XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HN7RZu25ghqhBP/V91DHU17DP4GGuZaqlXLciTMYaKY=; b=N2dRfH51Qo7VTQm8J9QpcYq3nuyBMQdRTvGngBhVT1MeStF9L/NwhjJ+K7Q2zVLDiHRUUCmdY079P+1qjm6jztq0tcZNTkGkplyoZxkSqoTU8EGnzliY5jx1eT8CKI4rJP/lUNJMA6VvtwOMH55HYo8XQeRZW59T9zsU+wUiAKY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) by DB8PR04MB7036.eurprd04.prod.outlook.com (2603:10a6:10:12f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.28; Tue, 16 Aug 2022 04:38:39 +0000 Received: from AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::6cd5:f11c:4e5c:d79c]) by AM6PR04MB6053.eurprd04.prod.outlook.com ([fe80::6cd5:f11c:4e5c:d79c%3]) with mapi id 15.20.5525.011; Tue, 16 Aug 2022 04:38:39 +0000 From: "Alice Guo (OSS)" <alice.guo@oss.nxp.com> To: wim@linux-watchdog.org, linux@roeck-us.net, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] watchdog: imx7ulp_wdt: init wdog when it was active Date: Tue, 16 Aug 2022 12:36:42 +0800 Message-Id: <20220816043643.26569-7-alice.guo@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220816043643.26569-1-alice.guo@oss.nxp.com> References: <20220816043643.26569-1-alice.guo@oss.nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0015.apcprd02.prod.outlook.com (2603:1096:3:17::27) To AM6PR04MB6053.eurprd04.prod.outlook.com (2603:10a6:20b:b9::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6bf71125-59a0-4349-d45c-08da7f4130a1 X-MS-TrafficTypeDiagnostic: DB8PR04MB7036:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gXs/QVch9fuPt/5ciCERqtCgXsIfZWw1KexpDJzu2Ku48u3E8DI8CvXuWXnWfPAJqfbf8UBZK3Wi57oGFhSRx17yEc7T/4qrj3zYvfXGcdR1rGxIWhA5qJPb+hbOj6NpSq4xFyMWv165wa73Oh86lJtX9MrXAX295K7hZfikIiYkepeLGrxAUke5aD2z6lk+pqXrCLl+nGDhlUm/JY1w/1X+fhTqbVtXZPo4+vNDwNgFC3OLP7WC2jpPT9mbUDwdBn1QwEa8ZS8TOM6RlUF856HzjIDINGdYP23NgEJ1Lz3Iu6ZZXCcFBwU5UTm2qcLRfMoXKn2P64pIGtbd+0ceO5Abfu3wRvZ9swTzb/XkWOWnKQXJODpzwwbkPS2PE2Le0OTqfAXjJVVvua38UP3gjRV3ruHXR3lpcAtIyZw0XdvyDEtgSofCXhzqbY9QX2Bmf0A27UsCnIKFD6YUBpORameRqANhYaunPKhUqMC91KcpGRHPqWZrlWOmq7Q6SpkIMqVU+HVRwxOEcJB5CugZbxDSydglSjSIpFyQzHnLiE/lAVuIifKtvO3Y1HuNzTVsOylDhzBfwiiPi8YiUffjgBaHVxWXOf6zie7lIlMXrQ5jPsGbkfNmCWsIstpNhv+7PVBLHos5eBwedTmECafNbi6nCNqcg/kK1GoYmuEZ6nrM2IEp1Cut0gN7Xki4fMV+LSCUYLCfazOrzXwbw8HRbAQHbxD6P71SM5iiXi5hr/15TGoa4gEeCXrU0TolJeJGb5izgsbYnTu8zYc6lQjaGiLHg+o9SbmpShEM6CyZQE0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6053.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(366004)(396003)(39860400002)(376002)(136003)(83380400001)(38350700002)(86362001)(38100700002)(4326008)(8676002)(66556008)(66946007)(66476007)(316002)(2906002)(8936002)(5660300002)(6512007)(6506007)(26005)(1076003)(41300700001)(2616005)(186003)(52116002)(6666004)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tHkSgZj4/9dGGv+8XQHHGPrQbaEl5fzXtw0wYnfFWoS8NRSeg7+X6VMNK0uum3Tm0pZhvR5jvTIOsXn/qyIGAUA3YjuJEtzVX84k7k8DvXFBdUHTZGmjgFFboxTr8TvEy1GEHc7SAVJ681A2VCODC+w5GWrhBCWabOo2bzbZzk8SFEDgjTAXuhPI7iJfNrK6fy6I1wDaSoDEE9BsDX/GeMlnuQguX6WKTUqvzxgxXSxzRKhnB6o6x5t9vh8Lg78kQnpvPfkF2TZob2H8IVIhfjfvUlwa8C4hgE2I5M+M4KqSuIRnxIM/ONeJ1UjsC6cw7Ek3E/aMFCYt9z1vW6FuV7o3rK4Q617cqawQ4a3venp5gtlNRUAFBVnclwePc4OFFf/uKhP13Ek1phO9VjqZ+w0hBvdMg5GPF4lm2gRq0xZAJBbaIRiIcgyrFcxcKl7x+xNhm5mrkEZGXpVIr/wyyl4/2EfN6mTygBVHupztwbvqT4COAmlobDsMx6h4OCmUYT4FshinTdoPyQAgNkrq6A3N2lV352Qegj4vMXY2u36ioJtihEuM9kBndkji0yKZTWI1pgUVXMtVw4nrHhc7Pjpc84G+HXmvpiFyXCnKdv/7UGr05hOKUhBD499XyrYFvOgBTirR46UL8U3jMkwUR4BD74/KVSg6yAGAdK7t6mAvHBg59cNea6aziyxA0Ue9jsUIjmtMMsG1O6IGXxgCGVl9us4UlgpERVHzE7A0C1Pdr5nRn72skK0T6O1tJAIxiLyM8SEF5TFcuzkpg3MXpRijx4LY3/wDriGBdXCNEd1ICVmdI7aYFS5cVl54hVsLvLRAP9YGZy6UMkkT47hjCUIEOJDONlaga0mTFNrqoLbhNlZ0HStbCQ6DnnTDL7NwtH3VsKppYLtq1ORX0LS00xZhQePzVI6q1omx9dAe8pJjgK9m+KtqAAg94S5vhYKybhwgFt459Rm8J+2YZNBzmRef7E7I2q/EjAV7nJ9riNQr7Duk7BOATSuQNWN9vD+b6w1TzDFVrNA3C1QVMt6toL6a+5Fsg+LO2ZU+I5C2mpXxpt1SWj7aS/PB0g8TvGyxqBx/FRx9/qcQmb4S5iElJAHpHfR3fKeLFGg58QZheCQujfQ9WqsCmykwLOxkYDViIudF7DVA2UdTAMwvN9/ok6S2gVgU6dM1u16110X7WRWsmQya/Ow7L9Fs2nposPqqGVkM1eZv08ZdSsES3KnURTEuXfPvpVAACtzk1acjRnZh8N5yavuylOkl9r9NuZ5Fzn4DY0o+HPS0qasNl9dZOQ3LuUIRGjWCJ3hJ26e1Zo+Uc+WnxAjFBchZ1bkm/yjJ7YW3dNOnQQhFP1PlTH3p/fh16ErlhFZghI4gFIO7wSlhUes6We7mds2EgzuaUvRbhL5srxSGryhtjAfcJK6fwj7Onub2cG7KMKgoBqNKqBRPPH5rUhZSEMjHxYNzTBAVJgJ5mO+tiepG+6j11SjcFz694PxWoLzB8mnTKxiolIHZ1+1m3hGH0044s2kgq7fFs8hOi0RmjyIeD9VFanHD/BLU2BWaqSdTLENIhOpPb3o9CiqVsDw3P2EuETcRHOHG X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bf71125-59a0-4349-d45c-08da7f4130a1 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6053.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2022 04:38:39.3422 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Az8rl9YUM+EnMd/LlqxwgvYVN/o0ZBe5dVbaTtVvZy3Bskqqmq8xNkOYFV5yupQ2DSFF3/ZJi//UbbX0Qs7cvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7036 Precedence: bulk List-ID: <linux-watchdog.vger.kernel.org> X-Mailing-List: linux-watchdog@vger.kernel.org |
Series |
watchdog: imx7ulp_wdt: update i.MX7ULP WDOG timer driver
|
expand
|
diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c index 51eaaf24bd8f..58508f69d933 100644 --- a/drivers/watchdog/imx7ulp_wdt.c +++ b/drivers/watchdog/imx7ulp_wdt.c @@ -136,13 +136,6 @@ static int imx7ulp_wdt_enable(struct watchdog_device *wdog, bool enable) return ret; } -static bool imx7ulp_wdt_is_enabled(void __iomem *base) -{ - u32 val = readl(base + WDOG_CS); - - return val & WDOG_CS_EN; -} - static int imx7ulp_wdt_ping(struct watchdog_device *wdog) { struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); @@ -382,11 +375,11 @@ static int __maybe_unused imx7ulp_wdt_resume_noirq(struct device *dev) if (ret) return ret; - if (imx7ulp_wdt_is_enabled(imx7ulp_wdt->base)) + if (watchdog_active(&imx7ulp_wdt->wdd)) { imx7ulp_wdt_init(imx7ulp_wdt, timeout); - - if (watchdog_active(&imx7ulp_wdt->wdd)) imx7ulp_wdt_start(&imx7ulp_wdt->wdd); + imx7ulp_wdt_ping(&imx7ulp_wdt->wdd); + } return 0; }