From patchwork Thu Jun 27 15:30:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2794091 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 1FFD99F3A0 for ; Thu, 27 Jun 2013 15:31:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8E49203A8 for ; Thu, 27 Jun 2013 15:31:15 +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 8C971203A3 for ; Thu, 27 Jun 2013 15:31:14 +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 1UsEAB-0003B8-7C; Thu, 27 Jun 2013 15:31:11 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UsEA6-0004XT-RR; Thu, 27 Jun 2013 15:31:06 +0000 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UsEA4-0004Ww-R0 for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2013 15:31:05 +0000 Received: by mail-wi0-f176.google.com with SMTP id ey16so3240443wid.3 for ; Thu, 27 Jun 2013 08:30:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=CTtEJqDA6RHB+JOgSgVui03WuPZkdwrfmmWeoWVqlCs=; b=SZpFcFGqQoLFozkvuTkq0NvRYBfz1FgnrhfBqqKXOK/eWe3filGkE3USunNr6Qnlqo NlvpHVidkO+6P+RMQyUWpzcwzie6v9luZNXrOF3oXbh1wK4e4N++ep4yX8INm1jRLG6E qHy+L7fgiQ0UHpqmLaED78E9NDRrvxinuZcBF4X3Oqxz0yqfptIfpjCxmz5G8ttvO2o2 Za4WDTvbPNu4eHAdsm2b12/8PY5UlWNZGy3c3rAutbSPMmyXEtOcpANaG9N9xBTPgb4X ih/2Wq7WkI6D12URkOrsToJDgrDTzI3EErc9Lv0Io1yqaqliKExF8qZOCWQFXgdH24Qj Egww== X-Received: by 10.194.179.33 with SMTP id dd1mr6647094wjc.51.1372347039510; Thu, 27 Jun 2013 08:30:39 -0700 (PDT) Received: from mai.home (AToulouse-654-1-435-101.w83-205.abo.wanadoo.fr. [83.205.66.101]) by mx.google.com with ESMTPSA id s19sm18026482wik.11.2013.06.27.08.30.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Jun 2013 08:30:38 -0700 (PDT) From: Daniel Lezcano To: linus.walleij@linaro.org Subject: [RFC PATCH] ARM: ux500: cpuidle: use of_compatible instead of cpu_id Date: Thu, 27 Jun 2013 17:30:53 +0200 Message-Id: <1372347053-27739-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQn756AE3ICmmLUVDgisLZtaWOM8M8nPCNM4qc+DTqVNxkLhTFoML2f2F+QmxbCpwxV7o82S X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130627_113104_975652_A0146995 X-CRM114-Status: GOOD ( 12.51 ) 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=-5.5 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 Remove the dependency on the id.h header by replacing the cpu_is_ functions by of_machine_is_compatible. In order to have cpuidle working on these SoC, the device tree must be enabled. Signed-off-by: Daniel Lezcano --- arch/arm/mach-ux500/cpuidle.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index a45dd09..872c6e9 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -21,7 +22,6 @@ #include #include "db8500-regs.h" -#include "id.h" static atomic_t master = ATOMIC_INIT(0); static DEFINE_SPINLOCK(master_lock); @@ -115,7 +115,11 @@ static struct cpuidle_driver ux500_idle_driver = { int __init ux500_idle_init(void) { - if (!(cpu_is_u8500_family() || cpu_is_ux540_family())) + if (!of_machine_is_compatible("st-ericsson,u8500") && + !of_machine_is_compatible("st-ericsson,u9540") && + !of_machine_is_compatible("calaosystems,snowball-a9500") && + !of_machine_is_compatible("st-ericsson,u9500") && + !of_machine_is_compatible("st-ericsson,mop500")) return -ENODEV; /* Configure wake up reasons */