From patchwork Tue Apr 22 13:19:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 4031871 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E064EBFF02 for ; Tue, 22 Apr 2014 13:20:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B67912021F for ; Tue, 22 Apr 2014 13:20:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 687E5201EF for ; Tue, 22 Apr 2014 13:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756134AbaDVNUC (ORCPT ); Tue, 22 Apr 2014 09:20:02 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:60557 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756004AbaDVNTv (ORCPT ); Tue, 22 Apr 2014 09:19:51 -0400 Received: by mail-we0-f180.google.com with SMTP id k48so1810727wev.39 for ; Tue, 22 Apr 2014 06:19:50 -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=LYYlIC4H3jMvjshSx1Ma/SZdwDun5n3EN7AVQjgVIfE=; b=fU31esFRr6e+6ZFXC+AA2NtL2FayodTfxZ5sqIOHnOytdP55mYZ4ov7Vv1gxDEa3y4 T4u8xGh4C5SRrQvD6MvKzk2RpXISUgWJFptQN+l6B685ytw/3NIWUr+hKW6EPM7T3s+Y K7iMYJdRcVNKZPUW/hGqtPc9Xgux67HlSP60Cx6CA89IGFVc4dR1NUBkG98mynXJBVQx 9qecrooh2I0q9YFFCNAHFWiNYT7rlBL3/5zv1Iqn4BaDnNJY9Vg/dRGFNapJ3ObnrUvO jwfBnY7nruVTjOTz8+RDOasFXoEekS5N/0Lc4T8kIUldFnUjSbjR6JRSx5UbD5fjRLJS DeOw== X-Received: by 10.194.187.107 with SMTP id fr11mr2327980wjc.70.1398172790325; Tue, 22 Apr 2014 06:19:50 -0700 (PDT) Received: from groucho.site ([109.201.154.204]) by mx.google.com with ESMTPSA id y20sm22579180wiv.14.2014.04.22.06.19.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2014 06:19:49 -0700 (PDT) X-Google-Original-From: Ulrich Hecht From: Ulrich Hecht To: linux-sh@vger.kernel.org, laurent.pinchart@ideasonboard.com, horms@verge.net.au Cc: magnus.damm@gmail.com, Ulrich Hecht , Ulrich Hecht Subject: [PATCH 3/4] ARM: shmobile: r8a7740: common clock framework board support Date: Tue, 22 Apr 2014 15:19:11 +0200 Message-Id: <1398172752-30567-4-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1398172752-30567-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1398172752-30567-1-git-send-email-ulrich.hecht+renesas@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY,URI_HEX autolearn=ham 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: Ulrich Hecht Adds support for the common clock framework to the Armadillo800 reference board and R8A7740 SoC setup code. Signed-off-by: Ulrich Hecht --- .../board-armadillo800eva-reference.c | 25 ++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7740.c | 2 ++ 2 files changed, 27 insertions(+) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c index 57d1a78..fa05621 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -118,6 +119,7 @@ * usbhsf_power_ctrl() */ +#ifndef CONFIG_COMMON_CLK static void __init eva_clock_init(void) { struct clk *system = clk_get(NULL, "system_clk"); @@ -152,14 +154,34 @@ clock_error: if (!IS_ERR(fsibck)) clk_put(fsibck); } +#else +static const struct clk_name clk_names[] __initconst = { + { "cmt1", NULL, "sh_cmt.10" }, + { "iic0", NULL, "fff20000.i2c" }, + { "mmc", NULL, "e6bd0000.mmc" }, + { "scifa0", NULL, "sh-sci.0" }, + { "scifa1", NULL, "sh-sci.1" }, + { "scifa2", NULL, "sh-sci.2" }, + { "scifa3", NULL, "sh-sci.3" }, + { "scifa4", NULL, "sh-sci.4" }, + { "scifa5", NULL, "sh-sci.5" }, + { "scifa6", NULL, "sh-sci.6" }, + { "scifa7", NULL, "sh-sci.7" }, + { "scifb", NULL, "sh-sci.8" }, + { "sdhi0", NULL, "e6850000.sd" }, + { "tpu0", NULL, "e6600000.pwm" }, +}; +#endif /* * board init */ static void __init eva_init(void) { +#ifndef CONFIG_COMMON_CLK r8a7740_clock_init(MD_CK0 | MD_CK2); eva_clock_init(); +#endif r8a7740_meram_workaround(); @@ -167,6 +189,9 @@ static void __init eva_init(void) /* Early BRESP enable, Shared attribute override enable, 32K*8way */ l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); #endif +#ifdef CONFIG_COMMON_CLK + shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); +#endif r8a7740_add_standard_devices_dt(); diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index a177a7b..8e81c61 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -913,7 +913,9 @@ void __init r8a7740_init_irq_of(void) static void __init r8a7740_generic_init(void) { +#ifndef CONFIG_COMMON_CLK r8a7740_clock_init(0); +#endif r8a7740_add_standard_devices_dt(); }