From patchwork Mon Jan 26 18:08:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 5711961 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6D17DC058D for ; Mon, 26 Jan 2015 18:10:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8612D20121 for ; Mon, 26 Jan 2015 18:10:44 +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 990EC2011E for ; Mon, 26 Jan 2015 18:10:43 +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 1YFo5e-0006sl-W3; Mon, 26 Jan 2015 18:08:46 +0000 Received: from eusmtp01.atmel.com ([212.144.249.243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YFo5b-0006pw-PA for linux-arm-kernel@lists.infradead.org; Mon, 26 Jan 2015 18:08:44 +0000 Received: from tenerife.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.2.347.0; Mon, 26 Jan 2015 19:08:19 +0100 From: Nicolas Ferre To: Alexandre Belloni Subject: [PATCH v2] ARM: at91: at91rm9200: set idle and restart from rm9200_dt_device_init() Date: Mon, 26 Jan 2015 19:08:33 +0100 Message-ID: <1422295713-26549-1-git-send-email-nicolas.ferre@atmel.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1421359100-8930-12-git-send-email-alexandre.belloni@free-electrons.com> References: <1421359100-8930-12-git-send-email-alexandre.belloni@free-electrons.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150126_100844_193511_ADF32854 X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -0.7 (/) Cc: Boris BREZILLON , Arnd Bergmann , Nicolas Ferre , linux-kernel@vger.kernel.org, Wenyou Yang , Bo Shen , Jean-Christophe PLAGNIOL-VILLARD , 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: , 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(); }