From patchwork Wed Nov 14 13:16:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10682583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A7FB14BA for ; Wed, 14 Nov 2018 13:16:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88FD22847F for ; Wed, 14 Nov 2018 13:16:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B9DA2AF5C; Wed, 14 Nov 2018 13:16:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1345228678 for ; Wed, 14 Nov 2018 13:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=tmv/iHF7Mu0B3rehyMmrfkrOMU/sbfbnz+RcGKh9HLQ=; b=m8sLhZ6rgYF8+l xYzysHPHv6v23wZ69zhWjzQrvRereKADiYmFBbuH7DxXtS/JNqtXQ0SdQuCsiGdMGd5z4c/Q8LnS4 ZF9IO41V0Epn+msmIKK/AwTrbDEl7eggtTUUkRSkKBHwtg9O4GDZeACE7Xll9Xbhd3Mz9IW++RzO4 9qU1kLidi45OOlTsbO6KQhPS0+XXMVyIsllmxDDMpAlOfNcTU2g54wTShNrjXdKlYxHEx5ClhG1El pvTdlagHKn9GMl+qGlBTQHfLlpiNWK8P+33mAbwKH8dMDuY1ZZUZ3+sAyw3Jd7wNPZFFewGwNfYTE IzeP/RrqZV2V0BUQy1Dw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMv2E-0004wb-Qw; Wed, 14 Nov 2018 13:16:46 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMv2A-0004sW-J1 for linux-amlogic@lists.infradead.org; Wed, 14 Nov 2018 13:16:43 +0000 Received: by mail-wr1-x444.google.com with SMTP id k15-v6so17207484wre.12 for ; Wed, 14 Nov 2018 05:16:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kL8jvYvMFWDaNaJSeIaQxNfaY5lCTtC9sm3OCvvB3Wo=; b=Pc86ONTf9PAyRcDJ1tIMCOOdLR9umQFC7aDrVz8SQdjyToWPHXeZ2fTlDaUCAHr1MV hEY2G1E7R7+ZLYXg8BYtTnoy/RgG6P9S60EAaLUY/gK3WPq7FgR4a39Y1jAYvPSKRLks zE9RU0roJqNycoyFDmqxuoDY6vOkamfVRyegIbl7DC0g3/iDo98lNYgylSHLQrBe3vHi 597B9YV57CeF19fUfTupzOPDJCLo0sWqp1DZRowRuw0n14TCMd4q48LejKRq80oLr+o2 whVyKVlGSmzKgZeo/2p/DCl+P0/5QuIVasv+OPs46X0YRWa0a+ebp1ByCZUXFIRHQjCR aSDQ== 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=kL8jvYvMFWDaNaJSeIaQxNfaY5lCTtC9sm3OCvvB3Wo=; b=hBh4hbuYUmhWEZ+xsq/nuX67QdPiydhVybhTkb529YisCAAGRt+ejEP7s6iz1ssZdQ Ud1io//tilY5s1r+mgeYZ/fH5aKdioH1SynKbuiXjmlhYTxwTykzWht0cpzr+qK8gXeU vzKienBTVL4/wEJE1YOQlOQUQlz3aWFVYnSGFGGPBYL63LVDUmgWZUm0DMLeIeUZOFbV HRG7Z7jh5j3Tlr7PJEnOihHTKZpgm4yjVnzeG6O3u0OC+tXOsTNKGRz8Akg6kbjO13J/ hdJbYylvak5kho28qwKmXBu164Yr1HnmDoJ7unROis2DZIHlSje+Ai1g/D/u0nbdUzEH iDXg== X-Gm-Message-State: AGRZ1gL6sTIiR0lyy4McffEwLf9a6Y6aMXoQgRt1OHz59wuEUGPYJSmb EpjtH+pWp/sBhLSA9RAwT1o1PA== X-Google-Smtp-Source: AJdET5dFcqF6BNZcdG5V6ZXXs/ShZ4GS+Jxs6rUNiHS/7F5fUn3jhBZqXBBB+dm9NmzAjUv1HyYuPw== X-Received: by 2002:a5d:4c4d:: with SMTP id n13-v6mr1842563wrt.298.1542201389864; Wed, 14 Nov 2018 05:16:29 -0800 (PST) Received: from bender.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id z7-v6sm22715225wrv.21.2018.11.14.05.16.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Nov 2018 05:16:28 -0800 (PST) From: Neil Armstrong To: khilman@baylibre.com Subject: [PATCH v2 0/3] Add Amlogic Meson GX SoC Clock Measure Driver Date: Wed, 14 Nov 2018 14:16:24 +0100 Message-Id: <20181114131627.17766-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181114_051642_622902_C9E18756 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Amlogic Meson GX SoCs embeds a clock measurer IP to measure the internal clocks frequencyies. The precision is determined by stepping into the divider until the counter overflows. The debugfs slows a pretty summary and each clock can be measured individually aswell. Thsi patchset includes the dt-bindings, driver and the DT node added to the meson-gx dtsi. Changes since v1 at [1]: - fixed clock names - added summary in debugfs and moved indivudual clocks into a subdirectory - added the GX table to the match data Neil Armstrong (3): dt-bindings: amlogic: Add Internal Clock Measurer bindings soc: amlogic: Add Meson GX Clock Measure driver ARM64: dts: meson-gx: Add Internal Clock Measurer node .../bindings/soc/amlogic/clk-measure.txt | 15 + arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 5 + drivers/soc/amlogic/Kconfig | 8 + drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-gx-clk-measure.c | 293 ++++++++++++++++++ 5 files changed, 322 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/amlogic/clk-measure.txt create mode 100644 drivers/soc/amlogic/meson-gx-clk-measure.c