From patchwork Sat Aug 3 10:57:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Austen X-Patchwork-Id: 13752334 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 2288BC3DA4A for ; Sat, 3 Aug 2024 10:59:06 +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=+9L3eB0PjTw8/WJJfJ6bjGYnz9iYteO3NaUNJ3h8kP0=; b=v2zCgXcjfd7O1AHI8WOBryeKfk SWaXUeQkCx4hBQdDtVfKod+ErWjhT408z+NPVnS2nYsQGA73Gm3fgY5QGVxAzOPAHuD9Z/hROg/vs Z6YgT9hpODNIIhFtGd8iIJFN0Yy5h3jQhYBzEBhBvwT3VD7+vWnTan0BWlsW7QcExw6wR4kuN1Q3Z NiFteyktPLRu36Z9oOsel7+bMp0yathkFY+ulJxEfl4/kB1MLH8nVWtgCpzXQw18d0I03wu5qJsfL m2VJipeTAhC/SfUaH5bdB7DPH07omzenyDsX8zmHgY6zq/QNjNsYbjI5oBwILbeOE+kjRnrFqimdS OA4LMBeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1saCTQ-0000000BFLJ-1h8M; Sat, 03 Aug 2024 10:58:56 +0000 Received: from mail-4322.protonmail.ch ([185.70.43.22]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1saCSV-0000000BF4E-14a4 for linux-arm-kernel@lists.infradead.org; Sat, 03 Aug 2024 10:58:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722682669; x=1722941869; bh=+9L3eB0PjTw8/WJJfJ6bjGYnz9iYteO3NaUNJ3h8kP0=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=i5Urta9os9xP1ID5TIudZdf/2btzg9hS3LHDl+wKTVVvJYphjNLfLqYP9PTXhhJRn u6ifuzF1pYmsN1ExSAzZBxmNS3pOxGQv6bu04oHwRcdde2jtR6IghTk6VbB0jH717v JzbuGjVBDKWMA7grSxnch+ncBPZY0bVSBWvTWIZI3jTv7B3nQzgcKHzh4vOK/eRfSh sxgtWam1Ys5NH2bjZ4j/gJfKTtAisyxxOgddVtX26KsJ/JkdQCbglvBpXK9Bpf8BIT 5lOnyuRjiVLjiggl8Cfpuklb9ClAUD4DODBfzVPHFptsk2sgo/yY02miNZfV3dzZn8 CpvlLBUjvOXFg== Date: Sat, 03 Aug 2024 10:57:44 +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 v2 0/9] clk: clocking-wizard: add user clock monitor support Message-ID: <20240803105702.9621-1-hpausten@protonmail.com> Feedback-ID: 53116287:user:proton X-Pm-Message-ID: 3b2a02ce4fddf6b775dcc78b381e70fd5b402cca MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240803_035759_468041_068E9EB2 X-CRM114-Status: GOOD ( 10.28 ) 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 functionailty 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! 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 | 32 +- 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, 285 insertions(+), 163 deletions(-) create mode 100644 drivers/uio/uio_xlnx_clk_mon.c