From patchwork Fri Mar 13 16:04:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1254499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=JsJufipa; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48f9XW0P6Vz9sPF for ; Sat, 14 Mar 2020 03:05:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 14D2881269; Fri, 13 Mar 2020 17:05:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="JsJufipa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B144813B5; Fri, 13 Mar 2020 17:05:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03on072c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe09::72c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5DB7980E9F for ; Fri, 13 Mar 2020 17:05:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nb1caP7VfxRSSs9bhV/XN1URHY9C19a2pDzv1cK8yOs3Go22nxylNOVVhG16A7X1PjYu0zZBoMnc65zZRufg9jvtCKyn6PK3dUQAeEuRzWTlG5rQaKCEL6EpKE8DzHFA+oMaJH1uMeGtVNumz+Hxz8TerGgSmGJppokLBi5ju+qJWYSrUCtFWu+bxaFJ0tBLDE7uNfKTHRUznG7+dxt6y7TFViXNd0gFm3Ir8EU50pcC4b951ah6Eka39p1W2Y+qpoiBJAurxihdCW0e5jLCV8q52tmhCZM2WQg3UiQGds4k/+50c1yUzffDiCwkkvVbsJRMoD4qE1LahXgW8K8w0g== 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-SenderADCheck; bh=/3fz+w+eKpK0JEeW/LkzKSg5/FwrxMyx6qaaDFd8k2U=; b=eZyaqWml46GcetppCG+EEeHyn8RXUicN2GfUapiHGuklBbB1fu8y+g/6pdvgf/MshO3VSFf1COFgLChvXkSLj+ZNZn9Bh4Hv/xsU5J5JuAFWeQfC/UspB0fEbT8lERjpevAxbPKqrKtaPjlDWp2gpOKMcmURNbAvMwoemgxw3y0DkUTWk7She9SbgXDG6a17XAdY0WpMsAMIf6P9LXsESrJD+t/C3plEJ2NbX1LUigqxzQPdXwJvTPbaL2G5xEwqfZzsjJEQphEnjckrm/7Nck4mTWmCsPugXK91LQWve448uXDdAbLa3mRJ5KqFYbewp8BZ8wEddiHFF6Gc5V2nLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/3fz+w+eKpK0JEeW/LkzKSg5/FwrxMyx6qaaDFd8k2U=; b=JsJufipaP6Wv0gjX+RD7zcnuO4cQdsrjiZwzF3E8KOgEa7W5+YSdWyWcFlcA4df4qBV0YpIuUp1iBvN/DnNaYCcsRlh5WP/PlJNV/Q3TgnhecB1bDFAjSiYJ1lHeWq7Y4aLVhDY0w5HvA3prN7+LABxgt9FOM3EwI+yJ+OeQjYQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasmus.villemoes@prevas.dk; Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (20.178.126.85) by VI1PR10MB3519.EURPRD10.PROD.OUTLOOK.COM (10.141.128.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.16; Fri, 13 Mar 2020 16:05:07 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7%5]) with mapi id 15.20.2793.013; Fri, 13 Mar 2020 16:05:07 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Stefan Roese , Christophe Leroy , Chris Packham , Rasmus Villemoes Subject: [PATCH 0/3] watchdog: honour hw_margin_ms property Date: Fri, 13 Mar 2020 17:04:55 +0100 Message-Id: <20200313160458.19727-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <39e2b876-6ba1-59b6-4ddd-068e120f9b4e@denx.de> References: <39e2b876-6ba1-59b6-4ddd-068e120f9b4e@denx.de> X-ClientProxiedBy: AM6PR08CA0009.eurprd08.prod.outlook.com (2603:10a6:20b:b2::21) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (5.186.114.43) by AM6PR08CA0009.eurprd08.prod.outlook.com (2603:10a6:20b:b2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Fri, 13 Mar 2020 16:05:06 +0000 X-Mailer: git-send-email 2.23.0 X-Originating-IP: [5.186.114.43] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dcf807f5-584f-4ea5-500b-08d7c7684c71 X-MS-TrafficTypeDiagnostic: VI1PR10MB3519: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 034119E4F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(376002)(396003)(39850400004)(136003)(346002)(366004)(199004)(316002)(8936002)(8976002)(8676002)(478600001)(2906002)(107886003)(86362001)(6666004)(81166006)(81156014)(966005)(66556008)(52116002)(66476007)(54906003)(186003)(4326008)(1076003)(4744005)(6506007)(26005)(36756003)(5660300002)(66946007)(6916009)(16526019)(2616005)(956004)(6486002)(44832011)(6512007); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB3519; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; Received-SPF: None (protection.outlook.com: prevas.dk does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aU9JgzDglWE2KZBQEzzBghb2KZK3fKcfnOQc54JffjAXfpiVY+wycmwoYIG72KcqsFq9kNJu4odujKcXLEjVza7G35UZk0YGLxTzJWRPNhUavflPTRPuDC8dz4ysnb4IeYyn2qWiWZdxIL05pbPrQovsrIg/ulJAZ7uRyUxbpzXAa+9RLHN2pXyA4i3uOEO4HQNDntm4bp4Cdiustsf1tYkWtvDQbW6mgaQzvM2A9pK4HCh7CzDXcn/t9E7gsEpbCPITAlWTFES1APJCX1zwaWJapEx2kQ+oEjoSWqbPCCLAzu3rNUg+PFP5QOC8+zVzCzw22Ptu3HIHGJ4qRXf8xD5CV7XVYzTAdN7lPEbIotHAJyy0+ogFhqAdV/cnrG6Jm0uJZseyu00bDYdixcX+Tgo84RSn6JtGW0k/Qz8mWPJed4GdDqMp+fou2zUWLPKOeoJ7aNopI6LHmTBDMY3zXkd4i6gnRIQ+S+ZSnnxpqXw1nlYpzGo/LEhAM4L/n9/bwX90rxcJDhXkkTIZMwuSpw== X-MS-Exchange-AntiSpam-MessageData: +uA+30xAZt3MWFe2EyJoPlA+6Hr/qJD6+LZMGFL/3MzYMIxFylDnArOEJzGHqchnM2PC4RF1VT2KyFQF/SI0HQcuthM2mMT1IDMbr600zvXLe90mv/cu6NdtJdEav/bC+hJkwdk9UggB/5titkV+2g== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: dcf807f5-584f-4ea5-500b-08d7c7684c71 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2020 16:05:07.1833 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WRmD6u7/GQkiJ4mvC6/9IZKZJkJrBJVG2Gn20coM2sKLHjPXhU2lpkmqWs5g2/P8kliELWTxgpiTKkWtMIKNVcSVt/1iwsarxWqHBUBy3LI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3519 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Some watchdogs must be reset more often than the once-per-second ratelimit used by the generic watchdog_reset function in wdt-uclass.c. There's precedent (from the gpio-wdt driver in linux) for using a property called hw_margin_ms to let the device tree tell the driver how often the device needs resetting. So use that generically. No change in default behaviour. On top of https://patchwork.ozlabs.org/patch/1242772/ . Stefan, something like this? That at least solves half my problems and might be useful to others as well. Then I'll have to figure out the time-stands-still problem in some other way. Rasmus Villemoes (3): watchdog: remove stale ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS from wdt.h watchdog: move initr_watchdog() to wdt-uclass.c watchdog: honour hw_margin_ms DT property drivers/watchdog/wdt-uclass.c | 43 ++++++++++++++++++++++++++++++++++- include/wdt.h | 38 +------------------------------ 2 files changed, 43 insertions(+), 38 deletions(-)