From patchwork Fri Jul 24 08:41:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 6858051 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 CC6FFC05AC for ; Fri, 24 Jul 2015 08:41:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08CA620602 for ; Fri, 24 Jul 2015 08:41:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F355420608 for ; Fri, 24 Jul 2015 08:41:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264AbbGXIlz (ORCPT ); Fri, 24 Jul 2015 04:41:55 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:54348 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320AbbGXIly (ORCPT ); Fri, 24 Jul 2015 04:41:54 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p1112-ipbfp1902kobeminato.hyogo.ocn.ne.jp [114.172.120.112]) by kirsty.vergenet.net (Postfix) with ESMTPSA id ECD0625B820; Fri, 24 Jul 2015 18:41:52 +1000 (AEST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 8FE7AEDE102; Fri, 24 Jul 2015 17:41:51 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Magnus Damm , Simon Horman Subject: [PATCH 1/9] ARM: shmobile: r8a7779: Generic CCF and timer support Date: Fri, 24 Jul 2015 17:41:42 +0900 Message-Id: <131c2e0480b0f7afefbc9a46cc4e158e17caa844.1437726584.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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: Magnus Damm Add a r8a7779-specific callback to initialize CCF and clocksources. With this in place we are one step closer to be able to use r8a7779 without C board code. Also add a multiplatform wrapper to avoid breaking the r8a7779 marzen legacy case. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7779.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index c03e562be12b..5625fd1c89c0 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -14,6 +14,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#include +#include #include #include #include @@ -756,6 +758,14 @@ u32 __init r8a7779_read_mode_pins(void) return mode; } +#ifdef CONFIG_ARCH_SHMOBILE_MULTI + +static void __init r8a7779_init_time(void) +{ + r8a7779_clocks_init(r8a7779_read_mode_pins()); + clocksource_of_init(); +} + static const char *r8a7779_compat_dt[] __initdata = { "renesas,r8a7779", NULL, @@ -764,8 +774,10 @@ static const char *r8a7779_compat_dt[] __initdata = { DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") .map_io = r8a7779_map_io, .init_early = shmobile_init_delay, + .init_time = r8a7779_init_time, .init_irq = r8a7779_init_irq_dt, .init_late = shmobile_init_late, .dt_compat = r8a7779_compat_dt, MACHINE_END +#endif /* CONFIG_ARCH_SHMOBILE_MULTI */ #endif /* CONFIG_USE_OF */