From patchwork Fri Nov 16 20:53:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10687025 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 2525A13B5 for ; Fri, 16 Nov 2018 20:53:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 123DE28944 for ; Fri, 16 Nov 2018 20:53:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 024AD28AE0; Fri, 16 Nov 2018 20:53:56 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 A3F8F28765 for ; Fri, 16 Nov 2018 20:53:56 +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=sxMjfnNhO7t97G/wzsq7d+n0hMSv8x7SFaU8o9e4Jqs=; b=eHzac6ljX1iime TMOHdJDmq5ySdz9nPUE5dWmpiRhbOuP0Pxld8JDQIrf+9SmZPwtUa7VJbMLmI/Wc1Y3CVKbz5x1CM BSCVM2Ah70EuvbvCCF5Hj/TRbZuMtgRsVjpywVoKgvX9EAdlmq3Er0Z1PnDaEa6bmnupbxUH2hQgu N87bEOTAEwvhKvIw0cyuHhFzhB3yg1pqJmTPA3jo/vgmNci1xClWatvdcmOB62qnyRfMzV7KKhy0K gNqpZwfIt21C/8G1IjbzYU50WLg4ntCPgVcv7hfNv3s5ZImq/S6SCCGDcnihH/ChE6U/AnvaScL1t 3puXrZ4UTUl5Un3uzf3g==; 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 1gNl7d-0007Eb-Us; Fri, 16 Nov 2018 20:53: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 1gNl7Z-0007BV-Ra; Fri, 16 Nov 2018 20:53:47 +0000 Received: by mail-wm1-x343.google.com with SMTP id q26so12165837wmf.5; Fri, 16 Nov 2018 12:53:35 -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=R4ENofjasmILkzT6+OfAXcy6neUWyBntZA7WcH9X380=; b=K/0haJRhGIswkKfETg6vJhyWzTrb1bgGoiYQrPaDE918UrjLFlgRvVDowwzO2NZW6p 2AC3VuQVdJlo++nBLtPVLH0XzJaHofXvCCuQMx3EYGoLff9X43t0U5ITtLsEYmLZj8xZ Of0YQvc/kNur09AEZZ5pwj/Z145uToHwrphyoOSWgLFRehGatNe1pcSiXV5lRyioT/Y0 mF3mgfCs2b2ZaUUFHyqHYYrwCKWrhVzfOTNOr8GpoWxmRrstNsKOMYhiGjt2qqOvogj0 uC9vgYpq+DiQNwfvpYfSmjeWnn4gytf6KyKCIHyfQBd8UazkXvAueB9udNfA9VEkX5c1 EYGg== 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=R4ENofjasmILkzT6+OfAXcy6neUWyBntZA7WcH9X380=; b=ixcQcviJTrdx2qIJBc9hL1L0esnbsAgvYO6RndPyWFpuMy7rKmuhA8FbZHEkxIIZfl aaw1uOgjtZCDWySP0qsQ1rzsMs4/yJiBR+4my0t85ivVY3djeG60ftGfYdZEX+HV4DpX qB4o630ixGmEG8UAv5+HMY9xEt/cTb5kHl6BoSgz0+U4fYi8nbLta0XjA91D2464eXDq qsJwQa3awVXCpBlWHXxHWe5Bqmaig8mFSnlaN6HQh/3K9C2sErK8291Stb2RPWe7r2Fe qa+lnS0Z+hDuBkqFGZqwUkve8d0rp/pwDsoS+fogbMVs5IkcQPWH00lKptrkcr+LW/sa qz4w== X-Gm-Message-State: AGRZ1gI82ngywgXYIILE3ZbirD7WTcXUWw4l6khZFFCgdFlCqYnUfO/7 ibQFKDnwCHL9y6f7Ksmysw2myb/c X-Google-Smtp-Source: AJdET5fSLaluzTZFJstyAKoMmx3UifqzCXZky2e+tN6UXMv58pgZXXeFi0WBNwrlWSveA3iLND+0KQ== X-Received: by 2002:a1c:5585:: with SMTP id j127-v6mr9442577wmb.127.1542401613427; Fri, 16 Nov 2018 12:53:33 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD717A1006D214A3B023844E6.dip0.t-ipconnect.de. [2003:dc:d717:a100:6d21:4a3b:238:44e6]) by smtp.googlemail.com with ESMTPSA id z192-v6sm16610273wmc.37.2018.11.16.12.53.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 12:53:32 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, narmstrong@baylibre.com, jbrunet@baylibre.com Subject: [PATCH 0/3] Meson8b: add the CPU clock post-dividers Date: Fri, 16 Nov 2018 21:53:00 +0100 Message-Id: <20181116205303.6354-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-20181116_125345_893159_A52B6724 X-CRM114-Status: GOOD ( 10.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: 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 setting CLK_IS_CRITICAL for these clocks in the driver. 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. [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 Martin Blumenstingl (3): dt-bindings: clock: meson8b: export the CPU post dividers 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/meson8b.c | 268 ++++++++++++++++++++++- drivers/clk/meson/meson8b.h | 17 +- include/dt-bindings/clock/meson8b-clkc.h | 4 + 3 files changed, 276 insertions(+), 13 deletions(-) Acked-by: Jerome Brunet