From patchwork Sun Nov 21 16:56:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12693223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5385C433EF for ; Sun, 21 Nov 2021 16:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5qxZryiJOjcOZnubmk7UaxqMygMUaOJl7sxZcEX88PY=; b=bMbn7POpwMlnu+ m/Q+YCVpQwRvpSPMxXCsXvDd1RFlzihXISudick/rhRmJKpDzu0uRuoEp/J/TVYoqZciEZdWe+oGF ARZBG6s60s/JxCcb9oN1T6qWEdLI1MJ7FW3qabT+7wE6Wrkh+WyKLg5yAgU057DHgLMGIc6qn00XZ AUbSVFUXsaKT4uFOTgyn+K4XXqs5zHVpAQUlZlgglpvObMyy2Pahk/YQMDODrwEWcKEIM7THYtEe5 QzXpw3YAdiG5epVgKUFjtSVxJ33D5ozr274ECae9nlXYdlRVZxaF0xSa9CxqZYjo80llAB3fZ/Wb1 V2P1+kUIx8SDCsL5L7+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1moq99-00DwFn-NM; Sun, 21 Nov 2021 16:56:55 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1moq95-00DwEP-Gz for linux-arm-kernel@lists.infradead.org; Sun, 21 Nov 2021 16:56:52 +0000 Received: by mail-lf1-x12a.google.com with SMTP id bi37so69181512lfb.5 for ; Sun, 21 Nov 2021 08:56:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7osbeXL+1CyqsigAAd8jmW1+rCcPt1AGKsERDXyK0YI=; b=WUPLA7RjKT3xPKZygE2w3taTSB5twgC2eq9PDKRSfa1PPRPzL8+MkrBce6yGyEQAF3 mch1OD1BCukVhN6aLSfIVkkcG0gMVKtrHW1pG6CDGBi6xuiUvY10g5mkWODWvIxjtDT/ CqWkbj/89y2AA5AqjgVj1mgOKlVbu06qKpMHEATr0ktsCsf7EYNtlAReE76UNjnUF+0V g5sZTk9B5EisOc+ijKVqOct9b8Z8atujfDodfxJ4G3YyvUiLbcIaH5EPLFLw/soSbG9U VPkHAdl8YpHZg/PfDSsksahOIPDbJEJpSv4JTwE8r9wF3tU5HMIC0bfe0A7CZ+cc87qR 2wcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7osbeXL+1CyqsigAAd8jmW1+rCcPt1AGKsERDXyK0YI=; b=jP6fzouYOLnSpBMTSdAuLWymIk0uuvu82jmbAaTS8kJoTky01Avk9lDjawVPGEaFBQ DonxO/XoGJgPBbwFeJ6yucxgAiJlgP2ifReJ4S4qBPe8a7hX0nQz1pVB/+O2R2b3OdWB RVLFiczTod1k1qM0hkScCjWb0ZvHxCcMQ2IWf8N50TeXfgHLbn84CYTizTqyTwORuSWw 0m8NDQePDQI36w0+AO/3Rf8mVj+jntMXeBYTzYu46k2LfXYFFoZZd4liX5IZuT3l1+ky a/KTUYWjJ7rNiwA5F9ItiwR5Ty1U1Lb9XEUR7zEJWLaS3jMMhGrqIsOzmtvJivVpOJ8s mAeQ== X-Gm-Message-State: AOAM533NycmaUCUaaxVgo8gJtKZoxfHtmqVMtPN77nS911r4wgMTazTU Z26/twPP39d7AylkcrLD6tW1VQ== X-Google-Smtp-Source: ABdhPJzKRvqwD4Q6Xp7gSwZpW/mjFpjkrELigO8PKAoLdpnI45QpaFepdc7bJOl5p9prPFM6xBC0eA== X-Received: by 2002:a2e:a593:: with SMTP id m19mr46616034ljp.407.1637513809310; Sun, 21 Nov 2021 08:56:49 -0800 (PST) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id g30sm614429lja.22.2021.11.21.08.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 08:56:48 -0800 (PST) From: Sam Protsenko To: Guenter Roeck , Wim Van Sebroeck Cc: Rob Herring , Krzysztof Kozlowski , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 00/12] watchdog: s3c2410: Add Exynos850 support Date: Sun, 21 Nov 2021 18:56:35 +0200 Message-Id: <20211121165647.26706-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211121_085651_610729_5E0D8DC9 X-CRM114-Status: GOOD ( 12.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Exynos850 WDT IP-core differs a bit from existing platforms: - Another set of PMU registers - Separate WDT instance for each CPU cluster, having different PMU registers/bits - Source clock is different from PCLK Implement all missing features above and enable Exynos850 WDT support. While at it, do a bit of cleaning up. Changes in v4: - Fixed build error when CONFIG_OF is disabled (found by 0-day) - Added R-b tag by Guenter Roeck to all patches Changes in v3: - Renamed "samsung,index" property to more descriptive "samsung,cluster-index" - bindings: Disabled "samsung,cluster-index" property for SoCs other than Exynos850 - Added quirks documentation - Removed has_src_clk field: clk framework can handle NULL clk; added s3c2410wdt_get_freq() function instead, to figure out which clock to use for getting the rate - Used pre-defined and completely set driver data for cluster0 and cluster1 - Coding style changes - Added R-b tags Changes in v2: - Added patch to fail probe if no valid timeout was found, as suggested by Guenter Roeck (03/12) - Extracted code for separating disable/mask functions into separate patch (06/12) - Added patch for inverting mask register value (07/12) - Extracted PMU cleanup code to separate patch, to ease the review and porting (09/12) - Added patch for removing not needed 'err' label in probe function (11/12) - Addressed all outstanding review comments on mailing list Sam Protsenko (12): dt-bindings: watchdog: Require samsung,syscon-phandle for Exynos7 dt-bindings: watchdog: Document Exynos850 watchdog bindings watchdog: s3c2410: Fail probe if can't find valid timeout watchdog: s3c2410: Let kernel kick watchdog watchdog: s3c2410: Make reset disable register optional watchdog: s3c2410: Extract disable and mask code into separate functions watchdog: s3c2410: Implement a way to invert mask reg value watchdog: s3c2410: Add support for WDT counter enable register watchdog: s3c2410: Cleanup PMU related code watchdog: s3c2410: Support separate source clock watchdog: s3c2410: Remove superfluous err label watchdog: s3c2410: Add Exynos850 support .../bindings/watchdog/samsung-wdt.yaml | 48 ++- drivers/watchdog/s3c2410_wdt.c | 324 +++++++++++++----- 2 files changed, 289 insertions(+), 83 deletions(-)