From patchwork Tue Jan 27 18:07:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 5719361 Return-Path: X-Original-To: patchwork-linux-arm@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 6BBD09F1D6 for ; Tue, 27 Jan 2015 18:10:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EBBD20218 for ; Tue, 27 Jan 2015 18:10:54 +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 9DDE82010F for ; Tue, 27 Jan 2015 18:10:53 +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 1YGAYW-0000c5-GV; Tue, 27 Jan 2015 18:08:04 +0000 Received: from eusmtp01.atmel.com ([212.144.249.242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YGAYT-0000UI-60 for linux-arm-kernel@lists.infradead.org; Tue, 27 Jan 2015 18:08:02 +0000 Received: from tenerife.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.2.347.0; Tue, 27 Jan 2015 19:07:35 +0100 From: Nicolas Ferre To: Alexandre Belloni , Boris BREZILLON , , Arnd Bergmann Subject: [PATCH 1/7] ARM: at91: at91rm9200: set idle and restart from rm9200_dt_device_init() Date: Tue, 27 Jan 2015 19:07:20 +0100 Message-ID: <18db7d680c8f526fb90198777fbb34222d74d606.1422381280.git.nicolas.ferre@atmel.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150127_100801_614370_4614016A X-CRM114-Status: GOOD ( 10.24 ) X-Spam-Score: -0.7 (/) Cc: Nicolas Ferre , Jean-Christophe PLAGNIOL-VILLARD , linux-kernel@vger.kernel.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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: Alexandre Belloni Setup arm_pm_idle and arm_pm_restart function pointers from rm9200_dt_device_init() function to simplify the at91rm9200 initialization process. This same move is already done for the sam9s. Signed-off-by: Alexandre Belloni [nicolas.ferre@atmel.com: adapt patch to newer series] Signed-off-by: Nicolas Ferre --- arch/arm/mach-at91/at91rm9200.c | 14 -------------- arch/arm/mach-at91/board-dt-rm9200.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 3be1963f5c56..ae0d5f0eb108 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -22,25 +22,11 @@ #include "generic.h" -static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd) -{ - /* - * Perform a hardware reset with the use of the Watchdog timer. - */ - at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); - at91_st_write(AT91_ST_CR, AT91_ST_WDRST); -} /* -------------------------------------------------------------------- * AT91RM9200 processor initialization * -------------------------------------------------------------------- */ -static void __init at91rm9200_initialize(void) -{ - arm_pm_idle = at91rm9200_idle; - arm_pm_restart = at91rm9200_restart; -} AT91_SOC_START(at91rm9200) - .init = at91rm9200_initialize, AT91_SOC_END diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c index d47c4433444d..5fcd1c73ece0 100644 --- a/arch/arm/mach-at91/board-dt-rm9200.c +++ b/arch/arm/mach-at91/board-dt-rm9200.c @@ -22,9 +22,21 @@ #include #include #include +#include + +#include #include "generic.h" +static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd) +{ + /* + * Perform a hardware reset with the use of the Watchdog timer. + */ + at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); + at91_st_write(AT91_ST_CR, AT91_ST_WDRST); +} + static void __init at91rm9200_dt_timer_init(void) { of_clk_init(NULL); @@ -35,6 +47,8 @@ static void __init rm9200_dt_device_init(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + arm_pm_idle = at91rm9200_idle; + arm_pm_restart = at91rm9200_restart; at91_rm9200_pm_init(); }