From patchwork Thu Aug 9 15:53:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10648 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3481423E40 for ; Thu, 9 Aug 2012 15:54:15 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 021A3A18440 for ; Thu, 9 Aug 2012 15:54:14 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so592402yen.11 for ; Thu, 09 Aug 2012 08:54:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=3UMcYTN9f/HSqfv+ckoRc6uFlnRSCrwGMl15ko5qFUE=; b=jP6yRki9w90Ui+y7Oiqitslrs5pOU27N4BiisLncUhLNOTcQC/YltmMKnRJaKU8SFJ rWiorw4FYrzOAHHeV9FXF2FeJ4eKzRsOARlvm3I8EpGmBRKQxO9J9LB3FQbbk/GoFUON PNt65NjlOajtHAUxbpbb8ZuCwYWTGRVSnVlLp9kjgMaB9N0GyxdGlWGL5/k05KEfg22V CobElxjCe/KQ6IrHoRfwwK3gSXX72w/R7x8o0TsPqgNyGno9ktnX4Z5+GqOa8m+7nL2m 3aiZz7TK/7nfM51K73vAz3ZPOKX4PZyxYHWbYlNF5oJaFDVhvO41p2ZCqvVvkbwceWzh JtCA== Received: by 10.42.86.138 with SMTP id u10mr966002icl.32.1344527654639; Thu, 09 Aug 2012 08:54:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp15575igc; Thu, 9 Aug 2012 08:54:13 -0700 (PDT) Received: by 10.180.96.3 with SMTP id do3mr4032321wib.5.1344527653216; Thu, 09 Aug 2012 08:54:13 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id 5si2023432wet.10.2012.08.09.08.54.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:54:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f172.google.com with SMTP id hm11so384437wib.13 for ; Thu, 09 Aug 2012 08:54:12 -0700 (PDT) Received: by 10.216.158.212 with SMTP id q62mr11134061wek.53.1344527652648; Thu, 09 Aug 2012 08:54:12 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id cl8sm2302659wib.10.2012.08.09.08.54.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:54:12 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, Lee Jones , Samuel Ortiz Subject: [PATCH 7/8] mfd: Use the AB8500's IRQ domain to convert hwirq to virq Date: Thu, 9 Aug 2012 16:53:54 +0100 Message-Id: <1344527635-6163-8-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344527635-6163-1-git-send-email-lee.jones@linaro.org> References: <1344527635-6163-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmI+0c1EW/UfcHkTWGzOXs4wGIYJZJR2sE0LJzwMMqEBnLS73G9nIbkpe8rQo7LspUw+4oB Before the AB8500 had its own IRQ domain, the IRQ handler would take the fired local IRQ (hwirq) and add it to the irq_base to convert it to an IRQ number which Linux would understand (virq). However, the IRQ base is not always used anymore since we can make use of Linear domains. It's better to use the AB8500 hwirq -> virq mapping helper function to convert them instead. That's what we do here. CC: Samuel Ortiz Signed-off-by: Lee Jones --- drivers/mfd/ab8500-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 0c5b70f..71a7757 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -501,8 +501,9 @@ static irqreturn_t ab8500_irq(int irq, void *dev) do { int bit = __ffs(value); int line = i * 8 + bit; + int virq = ab8500_irq_get_virq(ab8500, line); - handle_nested_irq(ab8500->irq_base + line); + handle_nested_irq(virq); value &= ~(1 << bit); } while (value);