From patchwork Tue Feb 4 15:21:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 11364841 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5395014E3 for ; Tue, 4 Feb 2020 15:21:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 322312166E for ; Tue, 4 Feb 2020 15:21:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z4H66yf0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727311AbgBDPVa (ORCPT ); Tue, 4 Feb 2020 10:21:30 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36029 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727305AbgBDPVa (ORCPT ); Tue, 4 Feb 2020 10:21:30 -0500 Received: by mail-wm1-f66.google.com with SMTP id p17so4165824wma.1; Tue, 04 Feb 2020 07:21:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GhE5FW40OPB90pmIillZl/71nzFIm2pOC803DrZ4Spw=; b=Z4H66yf0ClAGZ9BU9Y1LjQyl8Ns+xdotOdY3OLtZcf7OMRs2jRCAc1RFWdkKqv3Ge4 ajcwLi6kYGhEeQEv+X6c7uZtL310AGgjRwH6joEcoR56RGRNSK9Zbo4BSrecXFNUtu/d RGpAhtm/ChL1jX7kNaOHhr8V9w+ZcV6fyjNiNrq89p85D84E4jNAiyLZgHmP2dX0dm3u 0PGue8Tk4zklj0ulPaa0t/GTe13hxoLZ9qpLakHhxydDCDRhEEpPxAKBB2MX0UxGyx86 VkkyldEAOrIbz6m9zM4Eg8UFJeCOkWi5K8QYFUBUDuOS35wYEL+OGy3HXpB6k2vMxFop FGYA== 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:mime-version :content-transfer-encoding; bh=GhE5FW40OPB90pmIillZl/71nzFIm2pOC803DrZ4Spw=; b=qZr5YYNB96MVATmMITWbK06SIoLbRDVI0ZOiDW5qflbAGfY8MzLTCJsMTtq6KFa92X G3JpP1+QVa6rfeVBP6cmE68hasAjIbobhenNL51Y9J1j+GY3Yn2lhgyYDADAKSqP5LmM AP2iSoC3lxot8W+QQ2pWzGj9vpSaFmlGtbcHtM/BU9p0dTIkMqzWL0YU5E8maZMIa2Oc gsPENnYyO7D07sX2B2vfWb7Fo4q2JJ1/+bf49jZACYblie+TNO7JeiKN9o+uXBxDyB98 iiNRRVbUUI/diYNVViS917JsgTdLA+tTob/Fcmnu7TO+uhRVVAzRSl/ZStIT4baAzLtA HzZQ== X-Gm-Message-State: APjAAAXo5DAQZF0aUTI4kUdyYZEOEkIuQzkW5nLj5V3pLOTrOmSEKy0h E3S1h2z39vrk6S4VjltXnco= X-Google-Smtp-Source: APXvYqxj2GHvAQRiTyHO73SCccCsAxR0kmLAN3Xf1aA64me3ICvJ8h71Ene7V4cxj8rM4pJPz1nACw== X-Received: by 2002:a7b:c4c3:: with SMTP id g3mr6184072wmk.131.1580829687814; Tue, 04 Feb 2020 07:21:27 -0800 (PST) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id x10sm29902174wrv.60.2020.02.04.07.21.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 07:21:27 -0800 (PST) From: Ansuel Smith Cc: Ansuel Smith , Andy Gross , Bjorn Andersson , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] watchdog: qcom-wdt: add option to skip pretimeout Date: Tue, 4 Feb 2020 16:21:01 +0100 Message-Id: <20200204152104.13278-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Some platform like ipq806x doesn't support pretimeout. As the driver check if there are available interrupts and ipq806x use msm-timer that require interrupts, the watchdog fail to probe as request_irq tries to use a ppi interrupt. Add an option to skip pretimeout setup and use the normal watchdog probe. Signed-off-by: Ansuel Smith --- drivers/watchdog/qcom-wdt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c index a494543d3ae1..e689e97e883e 100644 --- a/drivers/watchdog/qcom-wdt.c +++ b/drivers/watchdog/qcom-wdt.c @@ -189,6 +189,7 @@ static int qcom_wdt_probe(struct platform_device *pdev) u32 percpu_offset; int irq, ret; struct clk *clk; + bool nopretimeout; regs = of_device_get_match_data(dev); if (!regs) { @@ -204,6 +205,8 @@ static int qcom_wdt_probe(struct platform_device *pdev) if (!res) return -ENOMEM; + nopretimeout = of_property_read_bool(np, "no-pretimeout"); + /* We use CPU0's DGT for the watchdog */ if (of_property_read_u32(np, "cpu-offset", &percpu_offset)) percpu_offset = 0; @@ -247,7 +250,7 @@ static int qcom_wdt_probe(struct platform_device *pdev) /* check if there is pretimeout support */ irq = platform_get_irq(pdev, 0); - if (irq > 0) { + if (!nopretimeout && irq > 0) { ret = devm_request_irq(dev, irq, qcom_wdt_isr, IRQF_TRIGGER_RISING, "wdt_bark", &wdt->wdd); From patchwork Tue Feb 4 15:21:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 11364843 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4915C1395 for ; Tue, 4 Feb 2020 15:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 279A22082E for ; Tue, 4 Feb 2020 15:21:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tb/kG89v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727334AbgBDPVf (ORCPT ); Tue, 4 Feb 2020 10:21:35 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37634 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727304AbgBDPVf (ORCPT ); Tue, 4 Feb 2020 10:21:35 -0500 Received: by mail-wm1-f67.google.com with SMTP id f129so4156733wmf.2; Tue, 04 Feb 2020 07:21:33 -0800 (PST) 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=hw4xZ1kYqp8gKYk3+om1U5PHQxcSQbw6w+wShSO5zY0=; b=Tb/kG89v4p60cznaGWi4jGb0no5xjGih/XfTLAI6BV/XsqyP9CYXMCcKMCYu8jdPwp fR37Eae23M8tczpXWmyORXL8LrJS2wOQzOfF+OUFLUmtYXo5736HH+hSQ9tMTFm9VsEE rGY+mOtHUr8E8NGFRYTV2IunnlnXWnTM8zPWkCLs6v+PDW7AgXLMShECvwdYYi06eAwv mo5wenDUAA/36f/0k9eKOzVgispGoLYw7dIJEvgu+zgcNM4O8VmMQFlWNKxrCQ4ejDm3 7GiO694T439wMIydZko/acP0dc0fY+rE2KDbuHzVJuObC/bAyt4wEPmJ1W6wmI5Kt6M/ iRQA== 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=hw4xZ1kYqp8gKYk3+om1U5PHQxcSQbw6w+wShSO5zY0=; b=obTBZ8tTb7HnC0ujQ3sWgWyOa1rl6wIw3BnZ2C7sfeCDlTHBe7hPJ3EHesUbsYqfHX /XwrXNFJQ27B/Cqe77xWpT8R3ftYOR4kXcunttmOmQ8GuYwz6uTnhB1un0RG0RtHR1jn sHreBl/XrMPoFDjTzvG03QAbcCZWCDT7yfq6vfsZTNYo33gySOiJzWstFbJnnr4uOmbG jPZ0BZC88Htw/SzxqMu3ruaX6yM/UqTATQi7S/D1eCKKKR5iDnoVKQ4aCgeM8cP5fESG YqnU21O99v2q6dWsrmYSegeptQzrGvIIGns/CvLY476JLMxN1LG/wzlkUVzUxbOTvUSU 5tBQ== X-Gm-Message-State: APjAAAVCZA7HAs1XkYXKRUMs033UZBwQTi7jCnDVhYtejh6rlQXyDY1U ilNReoiYKwUdhvjjwqktYN8= X-Google-Smtp-Source: APXvYqyqhJRpF0IBUgqXPq4gRr+htq5lVI2geTgVCQj21fYbe1kHlA6HUzk8LLHguNfpfHKhvvTNgw== X-Received: by 2002:a1c:3906:: with SMTP id g6mr6674925wma.49.1580829692715; Tue, 04 Feb 2020 07:21:32 -0800 (PST) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id x10sm29902174wrv.60.2020.02.04.07.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 07:21:32 -0800 (PST) From: Ansuel Smith Cc: Ansuel Smith , Andy Gross , Bjorn Andersson , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] Documentation: watchdog: qcom-wdt: Remove deprecated compatible Date: Tue, 4 Feb 2020 16:21:02 +0100 Message-Id: <20200204152104.13278-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200204152104.13278-1-ansuelsmth@gmail.com> References: <20200204152104.13278-1-ansuelsmth@gmail.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org "qcom,kpss-wdt-msm8960" "qcom,kpss-wdt-apq8064" "qcom,kpss-wdt-ipq8064" "qcom,kpss-wdt-ipq4019" and deprectaed and not used in the driver code at all. Drop them and fix the example. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/watchdog/qcom-wdt.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt b/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt index 41aeaa2ff0f8..33081bd33637 100644 --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt @@ -4,10 +4,6 @@ Qualcomm Krait Processor Sub-system (KPSS) Watchdog Required properties : - compatible : shall contain only one of the following: - "qcom,kpss-wdt-msm8960" - "qcom,kpss-wdt-apq8064" - "qcom,kpss-wdt-ipq8064" - "qcom,kpss-wdt-ipq4019" "qcom,kpss-timer" "qcom,scss-timer" "qcom,kpss-wdt" @@ -21,7 +17,7 @@ Optional properties : Example: watchdog@208a038 { - compatible = "qcom,kpss-wdt-ipq8064"; + compatible = "qcom,kpss-timer"; reg = <0x0208a038 0x40>; clocks = <&sleep_clk>; timeout-sec = <10>; From patchwork Tue Feb 4 15:21:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 11364849 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6358C139A for ; Tue, 4 Feb 2020 15:21:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 429202082E for ; Tue, 4 Feb 2020 15:21:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NRXhrdh5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727359AbgBDPVm (ORCPT ); Tue, 4 Feb 2020 10:21:42 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36993 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727304AbgBDPVm (ORCPT ); Tue, 4 Feb 2020 10:21:42 -0500 Received: by mail-wr1-f65.google.com with SMTP id w15so23598494wru.4; Tue, 04 Feb 2020 07:21:40 -0800 (PST) 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=IYd/QKfvl5lKpjb0P27O+LHksv33HQMEU50lHIKW7qc=; b=NRXhrdh5Rb97QAC85TQXRfLbha7BQp5PxRsH4sese3VbM9AkgzbaItOgm/MDbZLsj+ UKuR4IgAtwG+1yy7TsZ67lAlfd2ODdlrPMcfRUGLuvrNZB05GR7cI3AakFuVomWzZ4xD NV/tgUfHgHKVqvEovTB70a8rTWssXfzAB7mgaNU1WCy0MbS0UFydBpgNqZAkifH+0qHR KhCmGfvVxg5r7Yu8cRVvQ3XCR655Xt0/wPaoP7A0Kb7o3kCqct1q3AC9lCT5dCc4l0XQ //ZOv5xL+S/I3fvI6XzVkVrbkEny42NQR77EmDoDHdyFQqmYFdPyEryHcLVHS1GTCfs9 RJqA== 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=IYd/QKfvl5lKpjb0P27O+LHksv33HQMEU50lHIKW7qc=; b=OYr9sLGOjUeNB6Bd8+BbGhgntQQvAzpawxdNXXI5l7357bmvg7NR401JlnmSA/64zU iFBn8LP7W3xWL7eAKkjGqJp+MUT/zBiOJPzKB2kmlAuyCDzOmy04q6MbLRBAgVozHVf9 n+gktyVzCYS6wVxllvqItGLddMgUZQCRQba8DbgHRhiWm/u5ueTzkqz2zz3uyjXr78zh 29g40fIrReEM/w39RPA7qrkMGRnMnHJmU2FrsO6S4Gzneigkz0WOK9evEbw7eV3a91lv 8yLOM879vIfFe5ZmXhNClFYMhm3CoPjkM/zHvB4+0Ld6lt0XSUD1OiMurCuGOA01qx7P izow== X-Gm-Message-State: APjAAAX6IoAuoc7CKBrzONePs8uvgHpPvKFqaFXyvDrEgUHVoYRi6dp7 PB5BR/uJqvflqT6OC5U0644= X-Google-Smtp-Source: APXvYqzKp5ib9bjFyBvcOodNWyfCm3frsjRuCpkEVS86DeFPQsVS9Oh78tgaxHBk7beSKl4Y27QKig== X-Received: by 2002:a05:6000:1012:: with SMTP id a18mr12703005wrx.113.1580829699732; Tue, 04 Feb 2020 07:21:39 -0800 (PST) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id x10sm29902174wrv.60.2020.02.04.07.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 07:21:39 -0800 (PST) From: Ansuel Smith Cc: Ansuel Smith , Andy Gross , Bjorn Andersson , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] Documentation: watchdog: qcom-wdt: add new no-pretimeout option Date: Tue, 4 Feb 2020 16:21:03 +0100 Message-Id: <20200204152104.13278-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200204152104.13278-1-ansuelsmth@gmail.com> References: <20200204152104.13278-1-ansuelsmth@gmail.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add description for new no-pretimeout function to force legacy probe if any interrupt is defined. Signed-off-by: Ansuel Smith --- Documentation/devicetree/bindings/watchdog/qcom-wdt.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt b/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt index 33081bd33637..01978bff74ee 100644 --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt @@ -14,6 +14,8 @@ Required properties : Optional properties : - timeout-sec : shall contain the default watchdog timeout in seconds, if unset, the default timeout is 30 seconds +- no-pretimeout : shall be set if the platform have some interrupts + defined in the node but doesn't support pretimeout Example: watchdog@208a038 {