From patchwork Fri Sep 27 08:17:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2953371 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 BF4B89F244 for ; Fri, 27 Sep 2013 08:18:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE3B8202EB for ; Fri, 27 Sep 2013 08:18:58 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43B46201EF for ; Fri, 27 Sep 2013 08:18:57 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPTG5-0001PZ-Ip; Fri, 27 Sep 2013 08:18:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPTFw-0002VX-FP; Fri, 27 Sep 2013 08:18:32 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPTFe-0002Td-MS for linux-arm-kernel@lists.infradead.org; Fri, 27 Sep 2013 08:18:15 +0000 Received: by mail-wg0-f49.google.com with SMTP id l18so2272285wgh.28 for ; Fri, 27 Sep 2013 01:17:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4EnhUxwnfMxV6cujBdZWKxAohGlICfEVV8mJx4r2A2A=; b=X92i9kK/SW9PQG6UucohqnW5/dAeroCDbJq5dsLzjOlRN4RZyP7lwhwQqZ8e0fiU4d PP/KwNVqBntUrHeO1tHIk3iWpEMDTcCuslOfKb9cWxkva8VDMC3ZNbrke0ramKfhOq9a 2Zjy84rGpYtjlyq96a0OU3bbZ9tXlPcIrz1Q7VqJ0I69ZO3YixVav3W4+K0/O4yO+ehr oSTYPLw2rdUUDQne3eoZZbBHK1wDBiCKm9vOuXu+P4bdfFoxuUQZbXnSphuqfaYkE6ZE liLMTaWxzypaKpOjs8H4pJtjEJTLvDc07ArY+7WZXESXp/7V2F8IWUOhERhSxPOTM9Ds gEIw== X-Gm-Message-State: ALoCoQnEwQWXhplU3mIz5nzL160+Ng2KwzhjATi/wF0w0J2t8yEcfLdtor8+svtHkCuw+g0F1IIY X-Received: by 10.180.187.51 with SMTP id fp19mr1532412wic.1.1380269873040; Fri, 27 Sep 2013 01:17:53 -0700 (PDT) Received: from mai.home (AToulouse-654-1-326-179.w86-199.abo.wanadoo.fr. [86.199.213.179]) by mx.google.com with ESMTPSA id b13sm36076254wic.9.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Sep 2013 01:17:52 -0700 (PDT) From: Daniel Lezcano To: michal.simek@xilinx.com Subject: [PATCH 2/2] ARM: zynq: cpuidle: convert to platform driver Date: Fri, 27 Sep 2013 10:17:47 +0200 Message-Id: <1380269867-18336-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380269867-18336-1-git-send-email-daniel.lezcano@linaro.org> References: <1380269867-18336-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130927_041814_853911_C5EAB53A X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -2.6 (--) Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org 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=-6.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 As the ux500 and the kirkwood driver, make the zynq driver a platform driver Signed-off-by: Daniel Lezcano Acked-by: Michal Simek --- arch/arm/mach-zynq/common.c | 6 ++++++ drivers/cpuidle/cpuidle-zynq.c | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 5f25256..9a7bd13 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c @@ -44,6 +44,10 @@ static struct of_device_id zynq_of_bus_ids[] __initdata = { {} }; +static struct platform_device zynq_cpuidle_device = { + .name = "cpuidle-zynq", +}; + /** * zynq_init_machine - System specific initialization, intended to be * called from board specific initialization. @@ -56,6 +60,8 @@ static void __init zynq_init_machine(void) l2x0_of_init(0x02060000, 0xF0F0FFFF); of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL); + + platform_device_register(&zynq_cpuidle_device); } static void __init zynq_timer_init(void) diff --git a/drivers/cpuidle/cpuidle-zynq.c b/drivers/cpuidle/cpuidle-zynq.c index ab6c4b4..2ea3ebe 100644 --- a/drivers/cpuidle/cpuidle-zynq.c +++ b/drivers/cpuidle/cpuidle-zynq.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -69,11 +70,19 @@ static struct cpuidle_driver zynq_idle_driver = { }; /* Initialize CPU idle by registering the idle states */ -static int __init zynq_cpuidle_init(void) +static int __init zynq_cpuidle_probe(struct platform_device *pdev) { pr_info("Xilinx Zynq CpuIdle Driver started\n"); return cpuidle_register(&zynq_idle_driver, NULL); } -device_initcall(zynq_cpuidle_init); +static struct platform_driver zynq_cpuidle_driver = { + .driver = { + .name = "cpuidle-zynq", + .owner = THIS_MODULE, + }, + .probe = zynq_cpuidle_probe, +}; + +module_platform_driver(zynq_cpuidle_driver);