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: 9260381 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 3661360865 for ; Tue, 2 Aug 2016 21:42:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D10728536 for ; Tue, 2 Aug 2016 21:42:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2193E2853B; Tue, 2 Aug 2016 21:42:34 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8500928536 for ; Tue, 2 Aug 2016 21:42:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUhQX-0008Pw-1W; Tue, 02 Aug 2016 21:40:41 +0000 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUhQQ-0008OC-8t for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2016 21:40:36 +0000 Received: by mail-pf0-x233.google.com with SMTP id y134so70051481pfg.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=NmgGKnlcDtw/KVnNBSd3Z8DzS1MQT163Jps1RAuvj4Z5FFZSFMpTKxuGeedqLy2UUQ c8sS9aSiutmna2CBz7xlIR3W0J3Z+vRgyPC7sF9IS4RtXhau6xuikbw063ApZQYaMCU6 cYcYWSPEcASYFcFtIof20HuVhnMyOC8Q2o8nQZbbjMYK24i/C85gsLXgYGeuBhfNYFQ3 r7NfRq2YDRDJV7c2K7FmX+TclqoPW+sekM6of7DGH1jfjpA/tQixO71bJZWcOWfFhQ6K 4y0wxmiOnYCiFClSkVYzfqDjAdQP/LzBfAcAIvlufXjjXag8KijXuFHrYPS/C3LZp/gd VJDQ== X-Gm-Message-State: AEkoouvFfMWdbpbFbKmY5S5N22+CXYlADWmWxN8wTbs0pRrA5MPiYtxWQ9xmIYOctPr1xGdh 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160802_144034_483495_B9193D2E X-CRM114-Status: GOOD ( 12.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.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 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 */