From patchwork Mon Aug 26 12:38:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Austen X-Patchwork-Id: 13777830 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 DE168C5321E for ; Mon, 26 Aug 2024 12:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Subject:Cc:From:To:Date: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=Z6uBIkei9GJWLHndttwRgtzjIhDrXm6OeWouu1s7L4Q=; b=J0MptZeZUjOAbYqzFlrOyxWQhl mAPwKx453ZyleZiWbAxfn7GPW9EspCG5pQzc+ZluGhrf6EkX1IbWcZH2Q+vLooHZIyZODChjAt1kb nr0AZiEdHJpViFmlLDvjAEe0qoMouhEkCj/pZhNJ1ZNRGTd5ozAaegWAZ7QksJ7tGUTcZA+kuRCr4 JsqKip0ZIhwAdjxKozpfaIOuUgtG3kIiTiLL2wn+qZWmpdm3qqKGvKkjPIRgaPhecoJsSib3dYEPe oKjZH/2Y9Ex7PKAGhh2gAwH9Kt9EJXPBycjx63jp6QjV9bL9R2sjAg9JGamFVgCnP7ToFbIo33rAV kyNJEfrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siZ2j-00000007Ll9-3RWU; Mon, 26 Aug 2024 12:41:57 +0000 Received: from mail-40133.protonmail.ch ([185.70.40.133]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siYzA-00000007KkL-3koK for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 12:38:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724675891; x=1724935091; bh=Z6uBIkei9GJWLHndttwRgtzjIhDrXm6OeWouu1s7L4Q=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=DuT12gFQXjh4nlpdlkrGdxVLZtWOBnWUZ/xCeEcz0VDUnrYbnmrArxd54fo0ReUUT sYJpffNhgbWiIZ0K1AC/IdpRrTR9J0j/eLJ2xwRwl+cKK87tgdcw6+QrvDkIxQ4rEB ILVnKyEtwMM72EHaCu5katk3F6bkcvSky3RIhDxqvPonuxdriTEEHiXP71UISJrc7Q 7yeZSdj/dyxNbgPX39+MT+r079dBxFRsZ8+SapSzXXTQ8MdyAi87pVZkBDsrEXyU9d O3x28ifagsh6XlHa8UXMin1AakcqQ5zUqdomoyExDsXleETiS/j7BZ0VmpQMF5vweJ uClUH1VgEiAkQ== Date: Mon, 26 Aug 2024 12:38:06 +0000 To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michal Simek , Greg Kroah-Hartman From: Harry Austen Cc: Shubhrajyoti Datta , Dave Ertman , Ira Weiny , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Harry Austen Subject: [PATCH v3 0/9] clk: clocking-wizard: add user clock monitor support Message-ID: <20240826123602.1872-1-hpausten@protonmail.com> Feedback-ID: 53116287:user:proton X-Pm-Message-ID: a1269519a7006919c74b176bf00002bdb70b03ca MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_053817_123897_B5A2E1DA X-CRM114-Status: GOOD ( 10.90 ) 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 Improve utilised clk/notifier APIs, making use of device managed versions of functions, make dynamic reconfiguration support optional (because it is in hardware) and add support for the clock monitor functionality added in version 6.0 of the Xilinx clocking wizard IP core, through use of the auxiliary bus and UIO frameworks. The combined addition of all of these patches allows, for example, to use the clocking wizard solely for its user clock monitoring logic, keeping dynamic reconfiguration support disabled. This is currently untested on hardware, so any help testing this would be much appreciated! v2 -> v3: - Move kernel doc variable comment to bottom in clk_hw transition patch (2) - Remove extra line (and add Krzysztof's R-b tag) in binding patch (5) - Add Krzysztof's A-b tag to dynamic reconfig binding patch (8) v1 -> v2: - Split and improve clk_hw+devres transition patch (2+3) - Fix/improve DT binding patches (5+8) - Utilise auxiliary bus in monitor support patch (6) - Add dedicated UIO driver for monitor support (7) Harry Austen (9): clk: clocking-wizard: simplify probe/remove with devres helpers clk: clocking-wizard: use newer clk_hw API clk: clocking-wizard: use devres versions of clk_hw API clk: clocking-wizard: move clock registration to separate function dt-bindings: clock: xilinx: add description of user monitor interrupt clk: clocking-wizard: add user clock monitor support uio: add Xilinx user clock monitor support dt-bindings: clock: xilinx: describe whether dynamic reconfig is enabled clk: clocking-wizard: move dynamic reconfig setup behind flag .../bindings/clock/xlnx,clocking-wizard.yaml | 31 +- drivers/clk/xilinx/Kconfig | 1 + drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 335 +++++++++--------- drivers/uio/Kconfig | 8 + drivers/uio/Makefile | 1 + drivers/uio/uio_xlnx_clk_mon.c | 71 ++++ 6 files changed, 284 insertions(+), 163 deletions(-) create mode 100644 drivers/uio/uio_xlnx_clk_mon.c