From patchwork Mon Feb 16 16:58:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 5834041 X-Patchwork-Delegate: horms@verge.net.au 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83127BF6C3 for ; Mon, 16 Feb 2015 16:59:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A21BA200FE for ; Mon, 16 Feb 2015 16:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0A25200F2 for ; Mon, 16 Feb 2015 16:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163AbbBPQ7Z (ORCPT ); Mon, 16 Feb 2015 11:59:25 -0500 Received: from mail-we0-f178.google.com ([74.125.82.178]:34299 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752827AbbBPQ7Z (ORCPT ); Mon, 16 Feb 2015 11:59:25 -0500 Received: by mail-we0-f178.google.com with SMTP id w62so30243604wes.9 for ; Mon, 16 Feb 2015 08:59:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZgbWmm+uTU4aTi/sYFyTwb4Omhjz35TyKjZpaGV8O68=; b=NMDWLLbSr0AKYg1t6LEJ/+Sc+2XV9CqbzsLIHiUV/UMFoeSjj6Sk3YG8U27yw60mAY LTflzcgnUu3ffEWoJXlF+h9ZHbLsl7dm1nArsRMNuMw4ijC6AyVH5lJhSXzx+iV2h6KL 1XCFo4BLnTLcvZmeJGd0nVHQMUfLazjBGioiLfkga4tlgXoJE+cSMXTdUIqGHwU6rDpx giuYpxup1sqsrapULXjQzEGo4e/FmEKs6z8d9k1bgswkWBUC5HV2MAa7a+ImTdkBKM0M rZBb8NMvTxcKakyenvL46RfW7ySYUIPBgvBbOllStWVieDGQ9/oX9hB9nFZn4tigfjT/ NgNA== X-Received: by 10.180.171.35 with SMTP id ar3mr37570038wic.24.1424105964026; Mon, 16 Feb 2015 08:59:24 -0800 (PST) Received: from groucho.site (ipbcc0217c.dynamic.kabel-deutschland.de. [188.192.33.124]) by mx.google.com with ESMTPSA id dj5sm23633780wjb.28.2015.02.16.08.59.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 08:59:23 -0800 (PST) From: Ulrich Hecht To: horms@verge.net.au, linux-sh@vger.kernel.org, geert@linux-m68k.org, laurent.pinchart+renesas@ideasonboard.com, kuninori.morimoto.gx@renesas.com Cc: magnus.damm@gmail.com, sergei.shtylyov@cogentembedded.com, mturquette@linaro.org, Ulrich Hecht Subject: [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support Date: Mon, 16 Feb 2015 17:58:49 +0100 Message-Id: <1424105939-4910-6-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1424105939-4910-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1424105939-4910-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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY 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 Disables the legacy clock framework and passes the mode bits to the CPG driver if CCF is enabled. Signed-off-by: Ulrich Hecht Acked-by: Laurent Pinchart Acked-by: Geert Uytterhoeven --- arch/arm/mach-shmobile/board-bockw-reference.c | 2 ++ arch/arm/mach-shmobile/setup-r8a7778.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index d649ade..9a74efd 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c @@ -36,7 +36,9 @@ static void __init bockw_init(void) void __iomem *fpga; void __iomem *pfc; +#ifndef CONFIG_COMMON_CLK r8a7778_clock_init(); +#endif r8a7778_init_irq_extpin_dt(1); r8a7778_add_dt_devices(); diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index cef8895..c49aa09 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -15,6 +15,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -41,6 +42,21 @@ #include "irqs.h" #include "r8a7778.h" +#define MODEMR 0xffcc0020 + +#ifdef CONFIG_COMMON_CLK +static void __init r8a7778_timer_init(void) +{ + u32 mode; + void __iomem *modemr = ioremap_nocache(MODEMR, 4); + + BUG_ON(!modemr); + mode = ioread32(modemr); + iounmap(modemr); + r8a7778_clocks_init(mode); +} +#endif + /* SCIF */ #define R8A7778_SCIF(index, baseaddr, irq) \ static struct plat_sci_port scif##index##_platform_data = { \ @@ -608,6 +624,9 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") .init_early = shmobile_init_delay, .init_irq = r8a7778_init_irq_dt, .init_late = shmobile_init_late, +#ifdef CONFIG_COMMON_CLK + .init_time = r8a7778_timer_init, +#endif .dt_compat = r8a7778_compat_dt, MACHINE_END