From patchwork Mon Aug 3 06:04:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 6927371 Return-Path: X-Original-To: patchwork-linux-sh@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 0E6DF9F358 for ; Mon, 3 Aug 2015 06:05:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7FFE320520 for ; Mon, 3 Aug 2015 06:05:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B511B20504 for ; Mon, 3 Aug 2015 06:05:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751006AbbHCGFC (ORCPT ); Mon, 3 Aug 2015 02:05:02 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:39430 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920AbbHCGFB (ORCPT ); Mon, 3 Aug 2015 02:05:01 -0400 Received: from reginn.isobedori.kobe.vergenet.net (p1112-ipbfp1902kobeminato.hyogo.ocn.ne.jp [114.172.120.112]) by kirsty.vergenet.net (Postfix) with ESMTPA id 3844825B7BB; Mon, 3 Aug 2015 16:04:59 +1000 (AEST) Received: by reginn.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 56E8B9404F4; Mon, 3 Aug 2015 15:04:58 +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/6] ARM: shmobile: r8a7779: Generic CCF and timer support Date: Mon, 3 Aug 2015 15:04:52 +0900 Message-Id: <131c2e0480b0f7afefbc9a46cc4e158e17caa844.1438581659.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=-7.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 */