From patchwork Thu Nov 22 21:40:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10694899 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 885BA5A4 for ; Thu, 22 Nov 2018 21:40:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 773302CBED for ; Thu, 22 Nov 2018 21:40:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AEAB2CC45; Thu, 22 Nov 2018 21:40:51 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, URIBL_BLACK autolearn=unavailable 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 223EB2CBED for ; Thu, 22 Nov 2018 21:40:51 +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=ErMo9Lk1g4mU2DDPuTBtKsjFhiuxPF9T0gFuX0eau5A=; b=C/F7sP+um8sHB3 dXEXL7GElyGVWxziVS1/pPHEtLlZxXBitYGh1H3pd75UQCTMt0vWwDOir0hNX1oh4sZWcT0IaG/aO Zf+ApRawCKSoVWMyaugLSHhaY2ZYGAIt8gCDPJAyJXMWHvEUH/M6gmavJ0NfDn0sc91gp+PgyWO7u +jOD8Bebb+pohROpq2JIY5/0k6LnHttC0cdMYioDsBWa/WedyDFEcCfsK8LFRcKDKJebR+mTz0qcs dpT7SqTuTqunuRG3CVr+m+lLZL3VajzUf0HV5AkIutKYC1j15c5WayVYk1Qx4tP7XFmz4TSEstRke s14F/dn3utCcfthDT1tg==; 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 1gPwiP-0006OI-Fs; Thu, 22 Nov 2018 21:40:49 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPwiD-00069D-81; Thu, 22 Nov 2018 21:40:38 +0000 Received: by mail-wm1-x343.google.com with SMTP id c126so10292833wmh.0; Thu, 22 Nov 2018 13:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lEf8ew0Ss4HaxFBLQGgMBaQ8orjd3JGzoZQYwrnpOho=; b=c+0FW+UsFQsYAXLL+CBALS5Zo99mFTdv/eaOWmTVmpZ/pybf+1wawSeZSY9tkNwe1y Q01BoMR9EoM/oVOlQKrdLnvRdCz/k0YiQlxY3eN/jXeKMLQZrI20FM0e0B35o+Ib0xgm OKh2yV0oC88h3+YPPZ8Hp4pIjPH1nKtdHrFluDOd90Txgqm1/TXY/bAlgqm3WtKS7L5x EJDAPeBDUSumtXKBLRLRFkAdYoT8da3RxK1ZBxIis23EL3HCQ7z2vI0FRMcJMgCoNSC/ D5BtVV9/m1F8v7490+B2SkMytpFlySd7/5aEMGYBbs41RKdT4bEvUhDtRqRsrwCLm8Rt hHwQ== 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=lEf8ew0Ss4HaxFBLQGgMBaQ8orjd3JGzoZQYwrnpOho=; b=ElKDigw1NrUmxjC2P0Nzlal3wLm7L07Tet9u/1WfJmxyU5gPNQlpFym4GYZsqnIdH4 6YBJBIs7yCOBQSzAa0Tzs8xyLt4Iw7fRLeowWrdrDCfhJySgaOrPXA8dyJqZlSrzlOLg qMuzbHpEs5azY69D4g8SGtsbepLvEvUHDJSFdTFv/atSFUu+2HRvH5zWFIvAmuv8edBl fmzJOGqzLXBmiwrdQXseMqgFuGAa+QYw9eUJKOIjpdomv+Cz7miA7/zFenjVW6HRFBjD Y80isqSTshd2PxDjwrCwSamI4VZBTAY0vaUZ6n+k65Zj6rVliWWyeyEBiyo1PDxMtriT 3eew== X-Gm-Message-State: AA+aEWYXGvzEYp8QpGChFtU+7/qwXFc2iXdeEZLQhrja3DTRm5TE1RX1 uUECBdzB/q+BH6lm8UFCvZEywaYh X-Google-Smtp-Source: AFSGD/VfvVHFl0/Y2tUX0BQO4pqUG7sfex/TALv9EU7wYgCJsc7WmP5OsDuSMae1TqDcHMtUp2KgjA== X-Received: by 2002:a1c:bb42:: with SMTP id l63mr9652709wmf.47.1542922824760; Thu, 22 Nov 2018 13:40:24 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F5007DE18DA1F72FF8D9.dip0.t-ipconnect.de. [2003:dc:d732:f500:7de1:8da1:f72f:f8d9]) by smtp.googlemail.com with ESMTPSA id x14sm29755554wrm.65.2018.11.22.13.40.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 13:40:24 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, narmstrong@baylibre.com, jbrunet@baylibre.com Subject: [PATCH v2 0/4] Meson8b: add the CPU clock post-dividers Date: Thu, 22 Nov 2018 22:40:13 +0100 Message-Id: <20181122214017.25643-1-martin.blumenstingl@googlemail.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-20181122_134037_289487_B576DA8E X-CRM114-Status: GOOD ( 11.37 ) 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: sboyd@kernel.org, mturquette@baylibre.com, linux-kernel@vger.kernel.org, Martin Blumenstingl , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 This is the successor to my previous series "meson8b: add the CPU_DIV16 clock for the ARM TWD" from [0]. I decided to not send this as v2 of the original series because the PERIPH clock is not the CPU_DIV16 clock. It's not clear whether a CPU_DIV16 clock exists. With this series we get all the CPU_CLK post-dividers as listed in the public S805 datasheet [1] on pages 31 and 32: - ABP - PERIPH (used as input for the ARM global timer and ARM TWD timer) - AXI - L2 DRAM Each of these clocks has a register called "..._CLK_DIS" which is documented as a "just in case" bit: "Set to 1 to manually disable the [...] clock when changing the mux selection. Typically this bit is set to 0 since the clock muxes can switch without glitches." Since we're not supposed to touch that register we're using the new read-only gate clk_ops to ensure that nothing accidentally modifies these bits. The result of this is that we can use the PERIPH clock which clocks the ARM TWD timer. I will send a separate series to add the TWD timer. changes since v1 at [2]: - added new patch 2 "clk: meson: clk-regmap: add read-only gate ops" - switched from CLK_IS_CRITICAL to the new clk_regmap_gate_ro_ops so we're consistent with all other read-only clocks - collected Jerome's Acked-by tags (thanks!) [0] http://lists.infradead.org/pipermail/linux-amlogic/2018-July/007890.html [1] https://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf [2] https://patchwork.kernel.org/cover/10687023/ Martin Blumenstingl (4): dt-bindings: clock: meson8b: export the CPU post dividers clk: meson: clk-regmap: add read-only gate ops clk: meson: meson8b: rename cpu_div2/cpu_div3 to cpu_in_div2/cpu_in_div3 clk: meson: meson8b: add the CPU clock post divider clocks drivers/clk/meson/clk-regmap.c | 5 + drivers/clk/meson/clk-regmap.h | 1 + drivers/clk/meson/meson8b.c | 264 ++++++++++++++++++++++- drivers/clk/meson/meson8b.h | 17 +- include/dt-bindings/clock/meson8b-clkc.h | 4 + 5 files changed, 278 insertions(+), 13 deletions(-)