Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3160116yba; Mon, 6 May 2019 18:29:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQYKIDGhk5F1Jv5VWyUQdIEJAMj2H5PuXEEKq9uPQHQUYLuIdghtHHAmB1SVWuTjfoA5lH X-Received: by 2002:a63:1b04:: with SMTP id b4mr36055456pgb.305.1557192595190; Mon, 06 May 2019 18:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557192595; cv=none; d=google.com; s=arc-20160816; b=Zs2gAXspaG0keic4gAwnby7LJqn/C5LM8xWW/41mqIS6cDeN1za8+0ivqHArgU2YDJ c6OMU7nYZM4KwxQ+g1iMgY+3BTuzo4ppDzgoJ/c3gU9WPrk+V3dSwdfRXPlBOsANKOlD p5Gx5LYgs4zEjvztak5gNtqA6+rjuQnA91A1Np6gjF5N7OWQPjU82aDkILpmwcPpVWYl UCEzQA1Xeq9qYyR4W1Kx65uilNSrYnb6XOoWBpayKz+iJxqa0gIO6J/pZTtPaH/crbZB ucnHFRk/ai/5EkG4PbLHZ/y77wKDHPhDkCBRSAqmHeuvh7Qtb74aRv5cSIplUnx3YqaZ b1WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=54/FlCurW15BSMk7Gar9wAQsu+ticy+6F9OZ5t8rnl0=; b=y1LXstU+ZZMA2uioBnKJe5wWVGBceYWP66gOgoYRKqhXAJs2NUJccI5zlIPtfdwxds uUBV2kJlz77CAogGD3ktjCjVVbOkwyqfaFNY00NkTvAjBf/rmsPwvaxxoTHAqPAOly5p kbLFS0W1/YRyHF9kg1TV7nsNzgqPTnrZY1Dut3ei4siioRfQpfEJdbqv5aBQBI+9gM3J oc8KHbeMKH8PMq3Km5KeRUpon+QVihPhjYfcOqgi3Hera2ULfU7rje0QAnGck4xTwOLU PtjbGsO4PPV48Fae27bOYVp5HICpq6jEcLY1xSd0bbyyOx+OYp0yahl+SCvblo/t7pDK /PnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=DJ8YWiEk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m34si1911962pgb.324.2019.05.06.18.29.38; Mon, 06 May 2019 18:29:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=DJ8YWiEk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbfEGB2n (ORCPT + 99 others); Mon, 6 May 2019 21:28:43 -0400 Received: from mail-eopbgr80070.outbound.protection.outlook.com ([40.107.8.70]:62336 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726450AbfEGB2n (ORCPT ); Mon, 6 May 2019 21:28:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=54/FlCurW15BSMk7Gar9wAQsu+ticy+6F9OZ5t8rnl0=; b=DJ8YWiEkQZAsGMmof59WtbPwS5GJbzhk47K5zr/ZbI1fhbQ9LZ2CRED3cxG+5/aZv8B95ylamamlW+zbBbe9kJlUojpBEJ6IqhAE+HnR6MDCaBCBlAtgoePhlEfSc2mmhSWAdnjBjCK6Aw9Tk4wElt53AUdX1z8sxGHzFb9CWkY= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3721.eurprd04.prod.outlook.com (52.134.67.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Tue, 7 May 2019 01:28:26 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::e8ca:4f6b:e43:c170]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::e8ca:4f6b:e43:c170%3]) with mapi id 15.20.1856.012; Tue, 7 May 2019 01:28:26 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "wim@linux-watchdog.org" , "linux@roeck-us.net" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , Aisheng Dong , "ulf.hansson@linaro.org" , Peng Fan , Daniel Baluta , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" CC: dl-linux-imx Subject: [PATCH V4 3/3] watchdog: imx_sc: Add pretimeout support Thread-Topic: [PATCH V4 3/3] watchdog: imx_sc: Add pretimeout support Thread-Index: AQHVBHQpa5JP0ZHgW0eqFKg4Rv7umw== Date: Tue, 7 May 2019 01:28:23 +0000 Message-ID: <1557192198-19640-3-git-send-email-Anson.Huang@nxp.com> References: <1557192198-19640-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1557192198-19640-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0084.apcprd03.prod.outlook.com (2603:1096:203:72::24) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 716b5302-a5a0-42bb-e020-08d6d28b4bcd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:DB3PR0402MB3721; x-ms-traffictypediagnostic: DB3PR0402MB3721: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-forefront-prvs: 0030839EEE x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(39860400002)(136003)(396003)(376002)(189003)(199004)(316002)(7416002)(4326008)(2501003)(6512007)(14454004)(2906002)(6116002)(81156014)(36756003)(3846002)(305945005)(7736002)(66066001)(2201001)(53936002)(50226002)(8936002)(8676002)(5660300002)(11346002)(486006)(476003)(99286004)(110136005)(2616005)(86362001)(6436002)(26005)(102836004)(6486002)(14444005)(256004)(76176011)(186003)(52116002)(68736007)(6666004)(25786009)(446003)(64756008)(71190400001)(71200400001)(478600001)(73956011)(6506007)(386003)(81166006)(66446008)(66476007)(66946007)(66556008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3721;H:DB3PR0402MB3916.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: x4c5IcLvOUtyQau/CxRx2fdnXCOgl3/gbDgGLnMudoe0SjKZLcJM95KwpznkmlhHhOVZ5i6QuxKU43B/LL/bBirAfWkIJd3EaoVLKzyFYuz9/O/twlv1Mugj47cY3fc+z10OOU8S+vekYShx+GQb1b5MEfg6kzNVmSRTJXnG7fLMndnxFNsgY6vfgKc7lXNCpNcTrqVNSUS5Rvpsq0Lc2/ek84Q8MfMP176bQhVlVdmCeXdL5mbjH9MbYZA0haUSBd/X2/vRmG2Legw+X3Hqx5jWZ4zd/mQrfY+A4uU98qAPF8Ayu13bWcCVcZLUJYNP6BuRYmjKkFqxK9yXJFO0s8DlRZRB+/BkwEoZyW9TdT0URBVRz1T0Sy9beP1YIBeKSydCQu/EvM72vsw7jo3HotHezly9CFCNlMTBNWKXp0o= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 716b5302-a5a0-42bb-e020-08d6d28b4bcd X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2019 01:28:23.8167 (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-Transport-CrossTenantHeadersStamped: DB3PR0402MB3721 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWCBzeXN0ZW0gY29udHJvbGxlciB3YXRjaGRvZyBjYW4gc3VwcG9ydCBwcmV0aW1lb3V0IElS UQ0KdmlhIGdlbmVyYWwgU0NVIE1VIElSUSwgaXQgZGVwZW5kcyBvbiBJTVhfU0NVIGFuZCBkcml2 ZXIgTVVTVA0KYmUgcHJvYmVkIGFmdGVyIFNDVSBJUEMgcmVhZHksIHRoZW4gZW5hYmxlIGNvcnJl c3BvbmRpbmcgU0NVDQpJUlEgZ3JvdXAgYW5kIHJlZ2lzdGVyIFNDVSBJUlEgbm90aWZpZXIsIHdo ZW4gd2F0Y2hkb2cgcHJldGltZW91dA0KSVJ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