From patchwork Tue May 7 15:52:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 2536041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 15934DF215 for ; Tue, 7 May 2013 15:54:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZkD6-0006e8-Tx; Tue, 07 May 2013 15:53:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZkCg-0007Lf-E7; Tue, 07 May 2013 15:53:22 +0000 Received: from mail-de.keymile.com ([195.8.104.250]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZkCD-0007Gz-Iy for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2013 15:52:55 +0000 Received: from frodo.de.keymile.net ([10.9.1.54]:52721 helo=mailrelay.de.keymile.net) by mail-de.keymile.com with esmtp (Exim 4.76) (envelope-from ) id 1UZkBp-0001Vx-0l; Tue, 07 May 2013 17:52:29 +0200 Received: from chber1-10533x.keymile.net (chber1-10533x.keymile.net [172.31.40.3]) by mailrelay.de.keymile.net (8.12.2/8.12.2) with ESMTP id r47FoUxe016689; Tue, 7 May 2013 17:50:34 +0200 (MEST) From: Valentin Longchamp To: linux-arm-kernel@lists.infradead.org, andrew@lunn.ch, jason@lakedaemon.net Subject: [PATCH 1/3] clk: mvebu: add gate ctrl for Prestera kirkwood variants Date: Tue, 7 May 2013 17:52:19 +0200 Message-Id: <1367941941-19152-2-git-send-email-valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1367941941-19152-1-git-send-email-valentin.longchamp@keymile.com> References: <1367941941-19152-1-git-send-email-valentin.longchamp@keymile.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130507_115253_830665_247250CC X-CRM114-Status: GOOD ( 11.62 ) X-Spam-Score: -3.2 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -1.3 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: gregory.clement@free-electrons.com, Valentin Longchamp , devicetree-discuss@lists.ozlabs.org, sebastian.hesselbarth@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The kirkwood device found in the Prestera SoCs does not have all the peripherals of its the usual kirkwood SoCs. There are hence missing clocks in the SoCs. This patch registers another gate controller for the kirkwood that registers only the available clocks of this kirkwood variant. Signed-off-by: Valentin Longchamp --- .../devicetree/bindings/clock/mvebu-gated-clock.txt | 17 +++++++++++++++++ drivers/clk/mvebu/clk-gating-ctrl.c | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt index cffc93d..7f494e90 100644 --- a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt @@ -92,10 +92,27 @@ ID Clock Peripheral 19 ge1 Gigabit Ethernet 1 20 tdm Time Division Mplx +The following is a list of provided IDs for Kirkwood Prestera variant: +ID Clock Peripheral +----------------------------------- +0 ge0 Gigabit Ethernet 0 +2 pex0 PCIe Cntrl 0 +3 usb0 USB Host 0 +4 sdio SDIO Cntrl +5 tsu Transp. Stream Unit +6 dunit SDRAM Cntrl +7 runit Runit +8 xor0 XOR DMA 0 +16 xor1 XOR DMA 1 +17 crypto CESA engine +19 ge1 Gigabit Ethernet 1 + + Required properties: - compatible : shall be one of the following: "marvell,dove-gating-clock" - for Dove SoC clock gating "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating + "marvell,prestera-kw-gating-clock" - for Preseta SoC clock gating - reg : shall be the register address of the Clock Gating Control register - #clock-cells : from common clock binding; shall be set to 1 diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c index ebf141d..ba37802 100644 --- a/drivers/clk/mvebu/clk-gating-ctrl.c +++ b/drivers/clk/mvebu/clk-gating-ctrl.c @@ -203,6 +203,21 @@ static const struct mvebu_soc_descr __initconst kirkwood_gating_descr[] = { { "tdm", NULL, 20 }, { } }; + +static const struct mvebu_soc_descr __initconst prestera_kw_gating_descr[] = { + { "ge0", NULL, 0 }, + { "pex0", NULL, 2 }, + { "usb0", NULL, 3 }, + { "sdio", NULL, 4 }, + { "tsu", NULL, 5 }, + { "runit", NULL, 7 }, + { "xor0", NULL, 8 }, + { "powersave", "cpuclk", 11 }, + { "xor1", NULL, 16 }, + { "crypto", NULL, 17 }, + { "ge1", NULL, 19 }, + { } +}; #endif static const __initdata struct of_device_id clk_gating_match[] = { @@ -232,6 +247,10 @@ static const __initdata struct of_device_id clk_gating_match[] = { .compatible = "marvell,kirkwood-gating-clock", .data = kirkwood_gating_descr, }, + { + .compatible = "marvell,prestera-kw-gating-clock", + .data = prestera_kw_gating_descr, + }, #endif { }