From patchwork Mon Feb 9 16:02:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 5801801 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 3E701BF440 for ; Mon, 9 Feb 2015 16:03:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C899120120 for ; Mon, 9 Feb 2015 16:03:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFAE32012D for ; Mon, 9 Feb 2015 16:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933326AbbBIQDW (ORCPT ); Mon, 9 Feb 2015 11:03:22 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34433 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933203AbbBIQDW (ORCPT ); Mon, 9 Feb 2015 11:03:22 -0500 Received: by mail-wi0-f171.google.com with SMTP id l15so18710937wiw.4 for ; Mon, 09 Feb 2015 08:03:20 -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=XQRyhDAzSIXFOjel+n5s28WH4uuohcNy1HxxqxhnAo7420rJvev7atz2UR4oItzBY6 Y9vir/cWrqkBizOr/tKQIj7fyub8/uIQIIHSGBM6uw1OWgivINc59id6i/trJ6G62e0l fcLfLLLtHOBtX7EMqbENLfLDP8dc0b9T46X/EIZ/EhcdZa1aEW6Alj+sqfQmCPitX/DI I7VFx3tReyAEySKcTFCI01zvV0QjLXPGeKXGcGHyphQIu1xqXoZMz7aEbqeQQV4BwefS vnel34idLGPyY4Oq1A3GMPCY6+fu6wz8pd83/ZeWZQdVNZiUhLFnEQK45ZL8sIlApmsf gF6A== X-Received: by 10.194.95.66 with SMTP id di2mr42734700wjb.57.1423497800344; Mon, 09 Feb 2015 08:03:20 -0800 (PST) Received: from groucho.site (ipbcc0217c.dynamic.kabel-deutschland.de. [188.192.33.124]) by mx.google.com with ESMTPSA id k1sm16938212wjn.9.2015.02.09.08.03.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 08:03:19 -0800 (PST) From: Ulrich Hecht To: horms@verge.net.au, geert@linux-m68k.org, laurent.pinchart+renesas@ideasonboard.com, kuninori.morimoto.gx@renesas.com Cc: linux-sh@vger.kernel.org, magnus.damm@gmail.com, sergei.shtylyov@cogentembedded.com, mturquette@linaro.org, Ulrich Hecht Subject: [PATCH v2 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support Date: Mon, 9 Feb 2015 17:02:33 +0100 Message-Id: <1423497763-3450-6-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1423497763-3450-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1423497763-3450-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 --- 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