From patchwork Sat May 16 00:23:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 6418571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8BD429F318 for ; Sat, 16 May 2015 00:30:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B486920570 for ; Sat, 16 May 2015 00:30:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2FE020567 for ; Sat, 16 May 2015 00:30:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtPwv-0000fd-ON; Sat, 16 May 2015 00:27:29 +0000 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtPtn-0006Dx-Pl for linux-arm-kernel@lists.infradead.org; Sat, 16 May 2015 00:24:22 +0000 Received: by wizk4 with SMTP id k4so8855398wiz.1 for ; Fri, 15 May 2015 17:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tvKyJy8FaxW0xQzyu7lc3qSaXnQI3FFcD6hLSPf0RTI=; b=azwjyJ6j3X4Y84PtysiNq1s/EuF+k3c0Ox0I7W/AgvvpLm7viQFQojQaezA14x/pPG C+uGHkV/ai9yabiM0ay+mDAvXif8z2bUYzG0Se7UTIvfiiYnoXOVeyjHlURqgD2/Ycou oSh7KfaBWI+TaUh/zEsT8nUoCOJRRb2LiYeKhOOguC43kCb8cb3MrDhmXZmyN2+yu2Z1 OlglTLCF0bsYyIWeyD4VYhr4HXhhl4UJlcE7bDl/iGpicRrXL3XxRW9WuxT84Bz8CMFS Vhgbg3WVke3ldBU98Mdbt8Bi8FW2tF5vBQtIejZl6XytfKUFa7mg2FHPDZSuhSidA+AX 4CNQ== X-Received: by 10.180.82.73 with SMTP id g9mr1830258wiy.87.1431735833927; Fri, 15 May 2015 17:23:53 -0700 (PDT) Received: from topkick.lan (x5ce62600.dyn.telefonica.de. [92.230.38.0]) by mx.google.com with ESMTPSA id u3sm4842079wjq.36.2015.05.15.17.23.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 17:23:53 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 13/14] clk: berlin: drop direct of_iomap of nodes reg property Date: Sat, 16 May 2015 02:23:42 +0200 Message-Id: <1431735823-28006-14-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1431735823-28006-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1431735823-28006-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150515_172416_035700_8C6F00CF X-CRM114-Status: GOOD ( 10.72 ) X-Spam-Score: -0.8 (/) Cc: Antoine Ternart , Stephen Boyd , linux-arm-kernel@lists.infradead.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Antoine Tenart The Berlin clock driver was sharing a DT node with the pin controller and the reset driver. All these devices are now sub-nodes of the chip controller. This patch rework the Berlin clock driver to allow moving the Berlin clock DT bindings into their own sub-node of the chip controller node. Signed-off-by: Antoine Tenart Acked-by: Stephen Boyd Signed-off-by: Sebastian Hesselbarth --- Cc: Stephen Boyd --- drivers/clk/berlin/bg2.c | 9 +-------- drivers/clk/berlin/bg2q.c | 9 ++------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/clk/berlin/bg2.c b/drivers/clk/berlin/bg2.c index d8e57097518b..73153fc45ee9 100644 --- a/drivers/clk/berlin/bg2.c +++ b/drivers/clk/berlin/bg2.c @@ -508,10 +508,7 @@ static void __init berlin2_clock_setup(struct device_node *np) u8 avpll_flags = 0; int n; - if (of_device_is_compatible(parent_np, "syscon")) - np = parent_np; - - gbase = of_iomap(np, 0); + gbase = of_iomap(parent_np, 0); if (!gbase) return; @@ -689,9 +686,5 @@ static void __init berlin2_clock_setup(struct device_node *np) bg2_fail: iounmap(gbase); } -CLK_OF_DECLARE(berlin2_clock, "marvell,berlin2-chip-ctrl", - berlin2_clock_setup); -CLK_OF_DECLARE(berlin2cd_clock, "marvell,berlin2cd-chip-ctrl", - berlin2_clock_setup); CLK_OF_DECLARE(berlin2_clk, "marvell,berlin2-clk", berlin2_clock_setup); diff --git a/drivers/clk/berlin/bg2q.c b/drivers/clk/berlin/bg2q.c index 638a649ebed7..221f40c2b850 100644 --- a/drivers/clk/berlin/bg2q.c +++ b/drivers/clk/berlin/bg2q.c @@ -295,17 +295,14 @@ static void __init berlin2q_clock_setup(struct device_node *np) struct clk *clk; int n; - if (of_device_is_compatible(parent_np, "syscon")) - np = parent_np; - - gbase = of_iomap(np, 0); + gbase = of_iomap(parent_np, 0); if (!gbase) { pr_err("%s: Unable to map global base\n", np->full_name); return; } /* BG2Q CPU PLL is not part of global registers */ - cpupll_base = of_iomap(np, 1); + cpupll_base = of_iomap(parent_np, 1); if (!cpupll_base) { pr_err("%s: Unable to map cpupll base\n", np->full_name); iounmap(gbase); @@ -388,7 +385,5 @@ bg2q_fail: iounmap(cpupll_base); iounmap(gbase); } -CLK_OF_DECLARE(berlin2q_clock, "marvell,berlin2q-chip-ctrl", - berlin2q_clock_setup); CLK_OF_DECLARE(berlin2q_clk, "marvell,berlin2q-clk", berlin2q_clock_setup);