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: 10682591 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 657AF17F3 for ; Wed, 14 Nov 2018 13:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1391128623 for ; Wed, 14 Nov 2018 13:17:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07D0B2B461; Wed, 14 Nov 2018 13:17:07 +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 9702528623 for ; Wed, 14 Nov 2018 13:17:06 +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=5ejpUv5DiNZGIWmF9deG6xxuIK8cA1NG/BJrBOHTyz4=; b=hEVD3mpm4Zhd5h AJ7fTBZa3V/186e6UGcCY5tLo7p2XgC8YJwKLRRmdcQmntc2q8H22vRdVMmlFKnOSClWQ1wiL6D9M JSS0cifJEjZ3kGOFFNLhHKPJY67RQ8roNGiGH/HCdly4sQPyNCyEzu1T3bPTU7an1QvBq916GLrAK RiwiZzSsBM6oXEaA6uS98tEaYAA1hkZkjwziLg2iTObcn3Zsd4XnlAB0CYEl1WC+CXwAwVgROEOz0 ciPJZQZwu+rJgNQNML/n9i+VY/dtSl3kKvNa/7kLSl53MD7uL4XPE3v2jBX+f5/87jvW9GTAh70hQ vjEs0fZSIZhvWqqhEgDA==; 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 1gMv2W-0005Am-AO; Wed, 14 Nov 2018 13:17:04 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMv2A-0004sN-J6 for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2018 13:16:45 +0000 Received: by mail-wr1-x442.google.com with SMTP id u9-v6so17262693wrr.0 for ; Wed, 14 Nov 2018 05:16:31 -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=TSpmG789cHP+oyh7a84DicVDJAVgxqW0qqy+b/rCZpJxwY96NgLHpxTNxpf6O34FdP bRHb9bEZE+rE3qr+cUS+ePP+rGPJM6guRAJjEy6aSyCkEi/77BvssqLJBIaeWrMJ2GW+ YGgqZZaI7/hWe3W4RK6kDxqqvaUqyvcKVOnYwhfIiAeD2zZe7/jjBIARwhZESKWGkN94 oD1NMzAQh0PZjCoWfV1v8J3Pj3sRE/kbeI/nIzYkQ5V6N4ioOrZ9+jw5G0yczoSFwzG3 tt3lWkejd5K96TcFas19ffgy3HZ3+0dJ3Ss9oW4teAcifhyNpkH3uJzsu+VgkX7VFdpH 29NQ== X-Gm-Message-State: AGRZ1gIv2nkeXs+ZrbpOeXPGNABFfi7BD0Ej0fTqwaD9WYehVlghWw35 nEYySVTYE6jtPklL4yzDA9E4Hg== 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_652445_69F40909 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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