From patchwork Thu May 16 11:15:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16998 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 911EF2391B for ; Thu, 16 May 2013 11:16:23 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id j11sf117763qag.4 for ; Thu, 16 May 2013 04:15:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=5AozCZu0XnnLM8k/xe4T1C7QQkdTQMyOQt1S9GBk+Fk=; b=EZ4ZHKj6QY3LA4I59bNF71wtc5zUEyOs5aZbr1WvWMg7H68PTf1XNCqPu6bK3dmNcu YANQNh+7Nh/zKQMh038gErgLOmULEh53L/wBaGuECzMy5dabYUtBcq8qgTnwEYxds513 r7w/tZh2Rf87+th+PS5/HR/AyBvzwKuy/PHR7ykFCr+x5KZy12j5plt0zacEOAGnex8I B1vx+j2Klm5C4QWV7ItiGSd6E4fshtgzzz6y1IMle3eGib4kFRdpqtVQU8+F2xh+xK/z WyMri3AiIggQx0/2BmRbniUE/y2NBy4DObA5LVbt6VcDUaqfTyvbwcbt7mEr0mpJAkx0 iL7g== X-Received: by 10.236.142.11 with SMTP id h11mr13667983yhj.55.1368702944465; Thu, 16 May 2013 04:15:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.85.226 with SMTP id k2ls1099002qez.32.gmail; Thu, 16 May 2013 04:15:44 -0700 (PDT) X-Received: by 10.52.68.83 with SMTP id u19mr13329570vdt.63.1368702943925; Thu, 16 May 2013 04:15:43 -0700 (PDT) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [2607:f8b0:400c:c02::232]) by mx.google.com with ESMTPS id sc6si3681270vdc.8.2013.05.16.04.15.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 May 2013 04:15:43 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::232; Received: by mail-vb0-f50.google.com with SMTP id w15so149313vbb.23 for ; Thu, 16 May 2013 04:15:43 -0700 (PDT) X-Received: by 10.220.46.197 with SMTP id k5mr27954066vcf.40.1368702943751; Thu, 16 May 2013 04:15:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp59603vcs; Thu, 16 May 2013 04:15:43 -0700 (PDT) X-Received: by 10.180.90.70 with SMTP id bu6mr23618758wib.34.1368702942581; Thu, 16 May 2013 04:15:42 -0700 (PDT) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [2a00:1450:400c:c00::22d]) by mx.google.com with ESMTPS id d2si1344026wik.54.2013.05.16.04.15.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 May 2013 04:15:42 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::22d is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c00::22d; Received: by mail-wg0-f45.google.com with SMTP id l18so2594974wgh.12 for ; Thu, 16 May 2013 04:15:42 -0700 (PDT) X-Received: by 10.180.37.133 with SMTP id y5mr23270344wij.20.1368702942052; Thu, 16 May 2013 04:15:42 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPSA id ff10sm3035586wib.10.2013.05.16.04.15.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 May 2013 04:15:41 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, srinidhi.kasagar@stericsson.com, rob.herring@calxeda.com, Lee Jones Subject: [PATCH] ARM: ux500: Only configure wake-up reasons on ux500 based platforms Date: Thu, 16 May 2013 12:15:35 +0100 Message-Id: <1368702935-25599-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQl3mhFzX+2Ih+R6AJusUHqI5XwXwvHcZy8GM4VIQLptxrE2vRpiqDuryvyNxccrd8u1XU0S X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Multiplatform calls all enabled platforms' initcalls. In the ux500_idle_init() initcall we call into the DBx500-PRCMU which in turn executes some ux500 specific register reads/writes. When running on some !ux500 platforms this ends up causing a kernel Oops. This patch ensures the PRCMU call is only invoked when running on ux500 based platforms. Reported-by: Rob Herring Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpuidle.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index 317a2be..a45dd09 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c @@ -21,6 +21,7 @@ #include #include "db8500-regs.h" +#include "id.h" static atomic_t master = ATOMIC_INIT(0); static DEFINE_SPINLOCK(master_lock); @@ -114,6 +115,9 @@ static struct cpuidle_driver ux500_idle_driver = { int __init ux500_idle_init(void) { + if (!(cpu_is_u8500_family() || cpu_is_ux540_family())) + return -ENODEV; + /* Configure wake up reasons */ prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | PRCMU_WAKEUP(ABB));