From patchwork Sat May 31 12:10:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 4275361 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 779D89F1D6 for ; Sat, 31 May 2014 12:13:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72F8F20303 for ; Sat, 31 May 2014 12:13:40 +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 638BE202E5 for ; Sat, 31 May 2014 12:13:39 +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 1Wqi8F-0003Gn-Qn; Sat, 31 May 2014 12:11:27 +0000 Received: from smtp32.i.mail.ru ([94.100.177.92]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wqi7t-000391-HY for linux-arm-kernel@lists.infradead.org; Sat, 31 May 2014 12:11:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=ZXPqYQT1S6YIlvgfwAssQLJDJ83/PtnoxW89ZIPyfhw=; b=bRQ1rrGdyqjNpE8OaZgOQvzYbjj8zUiHUNdjin1tJvAmDl/9wK4g1/4unuklZXk109CgC0XA46WAfUrsUEidgVXarepmtbAwWirSiQo8Bj60ruMtg7tCax5a+PNj6Chc43EGB7ZQsTjWvLvzumfi47LPpQlzAr2i/NXqrPXSRuQ=; Received: from [5.18.98.7] (port=56821 helo=shc.zet) by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1Wqi7V-0004eX-Eb; Sat, 31 May 2014 16:10:41 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] ARM: clps711x: Switch CLPS711X subarch to use cpuidle driver Date: Sat, 31 May 2014 16:10:11 +0400 Message-Id: <1401538213-16106-3-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1401538213-16106-1-git-send-email-shc_work@mail.ru> References: <1401538213-16106-1-git-send-email-shc_work@mail.ru> X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140531_051106_205105_5C05AEDB X-CRM114-Status: GOOD ( 13.86 ) X-Spam-Score: -0.1 (/) Cc: Olof Johansson , Kevin Hilman , Russell King , Alexander Shiyan , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 This patch removes old support for cpuidle and switches all current users to use new cpuidle driver. Signed-off-by: Alexander Shiyan --- arch/arm/mach-clps711x/board-autcpu12.c | 1 - arch/arm/mach-clps711x/board-cdb89712.c | 1 - arch/arm/mach-clps711x/board-clep7312.c | 1 - arch/arm/mach-clps711x/board-edb7211.c | 1 - arch/arm/mach-clps711x/board-p720t.c | 1 - arch/arm/mach-clps711x/common.c | 12 ------------ arch/arm/mach-clps711x/common.h | 1 - arch/arm/mach-clps711x/devices.c | 10 ++++++++++ 8 files changed, 10 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c index d62ca16..45abf6b 100644 --- a/arch/arm/mach-clps711x/board-autcpu12.c +++ b/arch/arm/mach-clps711x/board-autcpu12.c @@ -266,7 +266,6 @@ MACHINE_START(AUTCPU12, "autronix autcpu12") /* Maintainer: Thomas Gleixner */ .atag_offset = 0x20000, .map_io = clps711x_map_io, - .init_early = clps711x_init_early, .init_irq = clps711x_init_irq, .init_time = clps711x_timer_init, .init_machine = autcpu12_init, diff --git a/arch/arm/mach-clps711x/board-cdb89712.c b/arch/arm/mach-clps711x/board-cdb89712.c index e261a47..1ec378c 100644 --- a/arch/arm/mach-clps711x/board-cdb89712.c +++ b/arch/arm/mach-clps711x/board-cdb89712.c @@ -140,7 +140,6 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712") /* Maintainer: Ray Lehtiniemi */ .atag_offset = 0x100, .map_io = clps711x_map_io, - .init_early = clps711x_init_early, .init_irq = clps711x_init_irq, .init_time = clps711x_timer_init, .init_machine = cdb89712_init, diff --git a/arch/arm/mach-clps711x/board-clep7312.c b/arch/arm/mach-clps711x/board-clep7312.c index 221b9de..1f3b403 100644 --- a/arch/arm/mach-clps711x/board-clep7312.c +++ b/arch/arm/mach-clps711x/board-clep7312.c @@ -38,7 +38,6 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") .atag_offset = 0x0100, .fixup = fixup_clep7312, .map_io = clps711x_map_io, - .init_early = clps711x_init_early, .init_irq = clps711x_init_irq, .init_time = clps711x_timer_init, .restart = clps711x_restart, diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c index 0776098..fa4580f 100644 --- a/arch/arm/mach-clps711x/board-edb7211.c +++ b/arch/arm/mach-clps711x/board-edb7211.c @@ -180,7 +180,6 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") .fixup = fixup_edb7211, .reserve = edb7211_reserve, .map_io = clps711x_map_io, - .init_early = clps711x_init_early, .init_irq = clps711x_init_irq, .init_time = clps711x_timer_init, .init_machine = edb7211_init, diff --git a/arch/arm/mach-clps711x/board-p720t.c b/arch/arm/mach-clps711x/board-p720t.c index 67b7337..4a2ec28 100644 --- a/arch/arm/mach-clps711x/board-p720t.c +++ b/arch/arm/mach-clps711x/board-p720t.c @@ -365,7 +365,6 @@ MACHINE_START(P720T, "ARM-Prospector720T") .atag_offset = 0x100, .fixup = fixup_p720t, .map_io = clps711x_map_io, - .init_early = clps711x_init_early, .init_irq = clps711x_init_irq, .init_time = clps711x_timer_init, .init_machine = p720t_init, diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index aee81fa..2a6323b 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c @@ -193,15 +193,3 @@ void clps711x_restart(enum reboot_mode mode, const char *cmd) { soft_restart(0); } - -static void clps711x_idle(void) -{ - clps_writel(1, HALT); - asm("mov r0, r0"); - asm("mov r0, r0"); -} - -void __init clps711x_init_early(void) -{ - arm_pm_idle = clps711x_idle; -} diff --git a/arch/arm/mach-clps711x/common.h b/arch/arm/mach-clps711x/common.h index 7489139..f881899 100644 --- a/arch/arm/mach-clps711x/common.h +++ b/arch/arm/mach-clps711x/common.h @@ -13,7 +13,6 @@ extern void clps711x_map_io(void); extern void clps711x_init_irq(void); extern void clps711x_timer_init(void); extern void clps711x_restart(enum reboot_mode mode, const char *cmd); -extern void clps711x_init_early(void); /* drivers/irqchip/irq-clps711x.c */ void clps711x_intc_init(phys_addr_t, resource_size_t); diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c index 2001488..0c689d3 100644 --- a/arch/arm/mach-clps711x/devices.c +++ b/arch/arm/mach-clps711x/devices.c @@ -14,6 +14,15 @@ #include +static const struct resource clps711x_cpuidle_res __initconst = + DEFINE_RES_MEM(CLPS711X_PHYS_BASE + HALT, SZ_128); + +static void __init clps711x_add_cpuidle(void) +{ + platform_device_register_simple("clps711x-cpuidle", PLATFORM_DEVID_NONE, + &clps711x_cpuidle_res, 1); +} + static const phys_addr_t clps711x_gpios[][2] __initconst = { { PADR, PADDR }, { PBDR, PBDDR }, @@ -83,6 +92,7 @@ static void __init clps711x_add_uart(void) void __init clps711x_devices_init(void) { + clps711x_add_cpuidle(); clps711x_add_gpio(); clps711x_add_syscon(); clps711x_add_uart();