From patchwork Wed Jun 25 13:06:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 4420531 Return-Path: X-Original-To: patchwork-linux-arm@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 D8C0DBEEAA for ; Wed, 25 Jun 2014 13:14:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 139B52038E for ; Wed, 25 Jun 2014 13:14:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59B52202D1 for ; Wed, 25 Jun 2014 13:14:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wzmzn-0006Tk-AQ; Wed, 25 Jun 2014 13:12:15 +0000 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzmyL-0005Nq-Pk for linux-arm-kernel@lists.infradead.org; Wed, 25 Jun 2014 13:10:48 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 9E5C7999; Wed, 25 Jun 2014 15:10:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 322C77F1; Wed, 25 Jun 2014 15:10:24 +0200 (CEST) From: Maxime Ripard To: linux@maxim.org.za, Nicolas Ferre , Jean-Christophe Plagniol-Villard , Daniel Lezcano Subject: [PATCH 10/13] AT91: soc: Add init_time callback Date: Wed, 25 Jun 2014 15:06:42 +0200 Message-Id: <1403701605-26678-11-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403701605-26678-1-git-send-email-maxime.ripard@free-electrons.com> References: <1403701605-26678-1-git-send-email-maxime.ripard@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140625_061046_029896_4D200920 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) Cc: Thomas Petazzoni , linux-kernel@vger.kernel.org, Boris Brezillon , Alexandre Belloni , Maxime Ripard , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Introduce an init_time callback to the at91_init_soc structure to be able to tweak the init_time machine callback on a per-soc basis, instead of having to rely on a global one. Signed-off-by: Maxime Ripard --- arch/arm/mach-at91/generic.h | 1 + arch/arm/mach-at91/setup.c | 5 +++++ arch/arm/mach-at91/soc.h | 1 + 3 files changed, 7 insertions(+) diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 77d4daeee66a..eb5512c3d717 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@ -42,6 +42,7 @@ extern void __init at91_sysirq_mask_rtt(u32 rtt_base); /* Timer */ +extern void __init at91_init_time(void); extern void at91rm9200_ioremap_st(u32 addr); extern void at91rm9200_timer_init(void); extern void at91sam926x_ioremap_pit(u32 addr); diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index f7a07a58ebb6..f8bd8d2c8205 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -533,3 +533,8 @@ void __init at91_initialize(unsigned long main_clock) pinctrl_provide_dummies(); } + +void __init at91_init_time(void) +{ + at91_boot_soc.init_time(); +} diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index a1e1482c6da8..57b9dda6eb83 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h @@ -12,6 +12,7 @@ struct at91_init_soc { void (*ioremap_registers)(void); void (*register_clocks)(void); void (*init)(void); + void (*init_time)(void); }; extern struct at91_init_soc at91_boot_soc;