From patchwork Wed Apr 11 22:43:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7740 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 B6F8C23E29 for ; Wed, 11 Apr 2012 22:43:59 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 76BBEA187CD for ; Wed, 11 Apr 2012 22:43:59 +0000 (UTC) Received: by iage36 with SMTP id e36so2605173iag.11 for ; Wed, 11 Apr 2012 15:43:58 -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:x-gm-message-state; bh=KrnCg8scUaapsxJUIuWT8pfIY0WSA3056/OU8qn/b4M=; b=Ja3iW8/NwNhnsCZIEEnMuDB1L4YxYmZxrCK4CmnKoCWPITCinJR9qL8ppoltq3tQoH 0aGMKTQAaxnTwq3nGS/G60fO5OiJdGDzbJja4sUyVckQNC9BJZ76q7NoTDrsCXzEsJ8Z Wp5QUT8wOxWDZHEobP/6FyCcsOfL1G9EYu1qoKluBuuXPmbLG7Vb79rj3uOVpaemX357 TvY/sSIpVJsvTJAQjofswgpeRcryaxdP7DuaqSoZvNfOriBJhnZpEPJZQjj90mLa/S1z ftKh6p1JWoybUWwMytLYzggbhHpNDvj2y6QNzPMd0BCZmbCi2ICtfHQZg9mK4W30O8Gu Jz7g== Received: by 10.42.203.148 with SMTP id fi20mr102319icb.10.1334184238840; Wed, 11 Apr 2012 15:43:58 -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.231.164.217 with SMTP id f25csp158486iby; Wed, 11 Apr 2012 15:43:57 -0700 (PDT) Received: by 10.112.48.202 with SMTP id o10mr81853lbn.25.1334184235932; Wed, 11 Apr 2012 15:43:55 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id ss10si1854103lab.66.2012.04.11.15.43.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Apr 2012 15:43:55 -0700 (PDT) Received-SPF: neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: from fecusia (c83-249-220-87.bredband.comhem.se [83.249.220.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id 9785765D32; Thu, 12 Apr 2012 00:43:53 +0200 (CEST) Received: by fecusia (sSMTP sendmail emulation); Thu, 12 Apr 2012 00:43:51 +0200 From: "Linus Walleij" To: linux-arm-kernel@lists.infradead.org Cc: Russell King , Linus Walleij Subject: [PATCH 1/3] integrator: fix the IRQ masks on the Integrator/CP Date: Thu, 12 Apr 2012 00:43:43 +0200 Message-Id: <1334184223-18864-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQkHl2FYQGA0c12P5+NMNL0mQFaaIRAp1JUh6LBPh7cCcA5MdYZB2CfHZ3yQAxnWVVZ29yBG The mask for the PIC FPGA IRQ controller was just wrong, so convert all the IRQ controllers to use the same, correct design pattern to produce the valid IRQ mask. Also use the IRQ_FOO_END macro consistently so this looks coherent. Signed-off-by: Linus Walleij --- arch/arm/mach-integrator/include/mach/irqs.h | 2 +- arch/arm/mach-integrator/integrator_cp.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h index a19a1a2..283931e 100644 --- a/arch/arm/mach-integrator/include/mach/irqs.h +++ b/arch/arm/mach-integrator/include/mach/irqs.h @@ -52,7 +52,7 @@ #define IRQ_CP_CPPLDINT 26 #define IRQ_CP_ETHINT 27 #define IRQ_CP_TSPENINT 28 -#define IRQ_PIC_END 31 +#define IRQ_PIC_END 28 #define IRQ_CIC_START 32 #define IRQ_CM_SOFTINT 32 diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 48a115a..2172f4c 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -163,10 +163,10 @@ static struct fpga_irq_data sic_irq_data = { static void __init intcp_init_irq(void) { - u32 pic_mask, sic_mask; + u32 pic_mask, cic_mask, sic_mask; - pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); - pic_mask |= (~((~0u) << (29 - 22))) << 22; + pic_mask = ~((~0u) << (1 + IRQ_PIC_END - IRQ_PIC_START)); + cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); /* @@ -181,8 +181,7 @@ static void __init intcp_init_irq(void) fpga_irq_init(-1, pic_mask, &pic_irq_data); - fpga_irq_init(-1, ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)), - &cic_irq_data); + fpga_irq_init(-1, cic_mask, &cic_irq_data); fpga_irq_init(IRQ_CP_CPPLDINT, sic_mask, &sic_irq_data); }