From patchwork Tue Aug 2 21:40:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 9260377 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A12760865 for ; Tue, 2 Aug 2016 21:40:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86D7E28534 for ; Tue, 2 Aug 2016 21:40:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 621F328538; Tue, 2 Aug 2016 21:40:16 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5712928534 for ; Tue, 2 Aug 2016 21:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753897AbcHBVkO (ORCPT ); Tue, 2 Aug 2016 17:40:14 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:32946 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753790AbcHBVkN (ORCPT ); Tue, 2 Aug 2016 17:40:13 -0400 Received: by mail-pf0-f171.google.com with SMTP id y134so70051474pfg.0 for ; Tue, 02 Aug 2016 14:40:13 -0700 (PDT) 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=/0fbovh4McBwT5+r3psJuMFZdmF2ZMNzM1R+dkFEkzY=; b=O+kvyDq7M3xVWIOAfhdGxBQM8aQbL7mSDb3YWQN6Cg/67OspRLqPdIjwoHVeU0K5S8 pAFSEi0I60m3iNznGqCJwSRlhgsvWrhX+QSzZL7p42oix3sScCQio0isFWl342CqKMz8 PWUFqxtc7TUnAQpCC/L712Xp+l42FeoulzskmpzjT3GAfZu11uuanjEpg1nuh16nl0HF AA7c9Ok5frU0r97d1kuPzVupEWX/FSVBeNdfTz4PGGz9u2t+4+Fie2tPL9qcx92AZN/l Im/N/SIWyXMbwFlkfJW2IwbjKfVp3sxVWyq4x+tnjXa098sgSeZifhGRk8Oxm7hSy5oD iBKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/0fbovh4McBwT5+r3psJuMFZdmF2ZMNzM1R+dkFEkzY=; b=cDT+Zteyo8H/O9i83B4y3WEraaDgIOreizlg2HzgtmKXnC5uZjaV400l1KqQ40eBcB Fc1ziTycDHFSIveFRdD5V18TUBYMDd77M0IsKFg5qCxWpR3S8orSooByJ0Wk02EmQbaj z5f35LTi2AClverXEmIEG6+tqvMYuCEa1dKVbso8BaPJmGXdCVnmUUH4jQMUYGtsTFIW XdpGGQqEzJyiWWznA7sXHNFytz0VIG0/g+trTsnDv6knt9cx7STgZPBTY40Pz3pymvZh EwFs4YWDxnMukBbKoXVk7xv24WsWnRBrxn4jKJpahH+e255ZKDjmn/i2O5BKO1A1CHuq oFBQ== X-Gm-Message-State: AEkoousI9GmkwxB9s5yy+KG3QciSmw0Gesyg0up1u2E1cpXWYUTN1PNYaLqShXuXqhL4yyPV X-Received: by 10.98.23.134 with SMTP id 128mr109743471pfx.96.1470174012481; Tue, 02 Aug 2016 14:40:12 -0700 (PDT) Received: from localhost (c-98-203-232-209.hsd1.wa.comcast.net. [98.203.232.209]) by smtp.gmail.com with ESMTPSA id p9sm7074092pfj.3.2016.08.02.14.40.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2016 14:40:11 -0700 (PDT) From: Kevin Hilman To: Mike Turquette , Stephen Boyd , linux-clk@vger.kernel.org Cc: linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] clk: gxbb: add MMC gate clocks, and expose for DT Date: Tue, 2 Aug 2016 14:40:11 -0700 Message-Id: <20160802214011.19077-1-khilman@baylibre.com> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the SD/eMMC gate clocks and expose them for use by DT. While at it, also explose FCLK_DIV2 since this is one of the input clocks to the mux internal to each of the SD/eMMC blocks. Signed-off-by: Kevin Hilman Tested-by: Martin Blumenstingl --- Applies on top of current clk-s905 branch. drivers/clk/meson/gxbb.c | 9 +++++++++ drivers/clk/meson/gxbb.h | 7 +++++-- include/dt-bindings/clock/gxbb-clkc.h | 4 ++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 007b7157cf4b..4fc8e58feef9 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -581,6 +581,9 @@ static MESON_GATE(sdio, HHI_GCLK_MPEG0, 17); static MESON_GATE(abuf, HHI_GCLK_MPEG0, 18); static MESON_GATE(hiu_iface, HHI_GCLK_MPEG0, 19); static MESON_GATE(assist_misc, HHI_GCLK_MPEG0, 23); +static MESON_GATE(emmc_a, HHI_GCLK_MPEG0, 24); +static MESON_GATE(emmc_b, HHI_GCLK_MPEG0, 25); +static MESON_GATE(emmc_c, HHI_GCLK_MPEG0, 26); static MESON_GATE(spi, HHI_GCLK_MPEG0, 30); static MESON_GATE(i2s_spdif, HHI_GCLK_MPEG1, 2); @@ -746,6 +749,9 @@ static struct clk_hw_onecell_data gxbb_hw_onecell_data = { [CLKID_AO_AHB_BUS] = &gxbb_ao_ahb_bus.hw, [CLKID_AO_IFACE] = &gxbb_ao_iface.hw, [CLKID_AO_I2C] = &gxbb_ao_i2c.hw, + [CLKID_SD_EMMC_A] = &gxbb_emmc_a.hw, + [CLKID_SD_EMMC_B] = &gxbb_emmc_b.hw, + [CLKID_SD_EMMC_C] = &gxbb_emmc_c.hw, }, .num = NR_CLKS, }; @@ -845,6 +851,9 @@ static struct clk_gate *gxbb_clk_gates[] = { &gxbb_ao_ahb_bus, &gxbb_ao_iface, &gxbb_ao_i2c, + &gxbb_emmc_a, + &gxbb_emmc_b, + &gxbb_emmc_c, }; static int gxbb_clkc_probe(struct platform_device *pdev) diff --git a/drivers/clk/meson/gxbb.h b/drivers/clk/meson/gxbb.h index a2adf3448b59..217df516de44 100644 --- a/drivers/clk/meson/gxbb.h +++ b/drivers/clk/meson/gxbb.h @@ -172,7 +172,7 @@ /* CLKID_CPUCLK */ #define CLKID_HDMI_PLL 2 #define CLKID_FIXED_PLL 3 -#define CLKID_FCLK_DIV2 4 +/* CLKID_FCLK_DIV2 */ #define CLKID_FCLK_DIV3 5 #define CLKID_FCLK_DIV4 6 #define CLKID_FCLK_DIV5 7 @@ -262,8 +262,11 @@ #define CLKID_AO_AHB_BUS 91 #define CLKID_AO_IFACE 92 #define CLKID_AO_I2C 93 +/* CLKID_SD_EMMC_A */ +/* CLKID_SD_EMMC_B */ +/* CLKID_SD_EMMC_C */ -#define NR_CLKS 94 +#define NR_CLKS 97 /* include the CLKIDs that have been made part of the stable DT binding */ #include diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-bindings/clock/gxbb-clkc.h index f889d80246cb..7d418643cdcc 100644 --- a/include/dt-bindings/clock/gxbb-clkc.h +++ b/include/dt-bindings/clock/gxbb-clkc.h @@ -6,7 +6,11 @@ #define __GXBB_CLKC_H #define CLKID_CPUCLK 1 +#define CLKID_FCLK_DIV2 4 #define CLKID_CLK81 12 #define CLKID_ETH 36 +#define CLKID_SD_EMMC_A 94 +#define CLKID_SD_EMMC_B 95 +#define CLKID_SD_EMMC_C 96 #endif /* __GXBB_CLKC_H */