From patchwork Sun Aug 5 23:03:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 10488 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 A823424048 for ; Sun, 5 Aug 2012 23:06:35 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4FACDA18036 for ; Sun, 5 Aug 2012 23:06:35 +0000 (UTC) Received: by obbuo19 with SMTP id uo19so4871224obb.11 for ; Sun, 05 Aug 2012 16:06:34 -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=p2lRaFGLs0yKWu+NuopH6i/AD22B7D+adNaTUxfNA1s=; b=VlK9bP5AHQs99M+kPkSYTjU+QmAIs6+aH4kxRQvfjDDcx0gl9OArbwjoZl20coFpyc 0bdgpmZ2FBMNNTMYIwKf2l45L2/N5cxtRFwcBSQz9Bv2qvBwo4BwLCfGABQrJo3H5tCm wfwcjmwuPtsEntewmy3LUprOzH6zQVPbKjAgJdbYtzbV+Dqy7NTzQlaQAJly3thyX9CP Bek9uln5j2w7sr8JjD16sDL9BM8sm1uwurdIfZQ0mELSSYMpq7mm2KYsYwankNdGnSBt eILXpasxwz0hpLaCuMAhjWXnJyRRcZv97SRM/TJjCngTb6srG8sksD+HS7669T4m1X1z gEVw== Received: by 10.50.46.132 with SMTP id v4mr3821326igm.25.1344207994464; Sun, 05 Aug 2012 16:06:34 -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.87.40 with SMTP id u8csp412124igz; Sun, 5 Aug 2012 16:06:33 -0700 (PDT) Received: by 10.66.76.196 with SMTP id m4mr14131340paw.61.1344207993601; Sun, 05 Aug 2012 16:06:33 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id rd4si9439834pbc.190.2012.08.05.16.06.33 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 05 Aug 2012 16:06:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by pbcmd12 with SMTP id md12so3221727pbc.37 for ; Sun, 05 Aug 2012 16:06:33 -0700 (PDT) Received: by 10.68.218.7 with SMTP id pc7mr14457052pbc.88.1344207993139; Sun, 05 Aug 2012 16:06:33 -0700 (PDT) Received: from localhost (m9f0536d0.tmodns.net. [208.54.5.159]) by mx.google.com with ESMTPS id og4sm7584687pbb.48.2012.08.05.16.06.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 05 Aug 2012 16:06:32 -0700 (PDT) From: Anton Vorontsov To: Russell King Cc: John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com, Ben Dooks , Kukjin Kim , Sascha Hauer , Tony Lindgren , Mark Brown , Liam Girdwood Subject: [PATCH 1/9] ARM: mach-rpc: Don't register FIQs with genirq Date: Sun, 5 Aug 2012 16:03:31 -0700 Message-Id: <1344207819-3415-1-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20120805230238.GA1663@lizard> References: <20120805230238.GA1663@lizard> X-Gm-Message-State: ALoCoQlL36gBrIZQNR57PfZOjOX5OUskYbGd/mm7RF+2ak3rCHQ2BXdwFKvi1ITX9DPtJTkUmgXF mach-rps registers FIQ controller with genirq, which makes no sense: these FIQs cannot be routed to IRQs, so there is no need to register it with genirq. This effectively makes FIQ_START irrelevant. Signed-off-by: Anton Vorontsov --- arch/arm/mach-rpc/dma.c | 4 ++-- arch/arm/mach-rpc/include/mach/irqs.h | 5 +++++ arch/arm/mach-rpc/irq.c | 19 ++++--------------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c index 85883b2..4a525be 100644 --- a/arch/arm/mach-rpc/dma.c +++ b/arch/arm/mach-rpc/dma.c @@ -289,13 +289,13 @@ static void floppy_enable_dma(unsigned int chan, dma_t *dma) set_fiq_handler(fiqhandler_start, fiqhandler_length); set_fiq_regs(®s); - enable_fiq(fdma->fiq); + iomd_unmask_fiq(fdma->fiq); } static void floppy_disable_dma(unsigned int chan, dma_t *dma) { struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma); - disable_fiq(fdma->fiq); + iomd_mask_fiq(fdma->fiq); release_fiq(&fh); } diff --git a/arch/arm/mach-rpc/include/mach/irqs.h b/arch/arm/mach-rpc/include/mach/irqs.h index 6868e17..f27ead1 100644 --- a/arch/arm/mach-rpc/include/mach/irqs.h +++ b/arch/arm/mach-rpc/include/mach/irqs.h @@ -37,6 +37,11 @@ #define FIQ_EXPANSIONCARD 6 #define FIQ_FORCE 7 +#ifndef __ASSEMBLY__ +extern void iomd_mask_fiq(int fiq); +extern void iomd_unmask_fiq(int fiq); +#endif + /* * This is the offset of the FIQ "IRQ" numbers */ diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c index 3e4fa84..a4221b3 100644 --- a/arch/arm/mach-rpc/irq.c +++ b/arch/arm/mach-rpc/irq.c @@ -89,30 +89,24 @@ static struct irq_chip iomd_dma_chip = { .irq_unmask = iomd_unmask_irq_dma, }; -static void iomd_mask_irq_fiq(struct irq_data *d) +void iomd_mask_fiq(int fiq) { unsigned int val, mask; - mask = 1 << (d->irq & 7); + mask = 1 << (fiq & 7); val = iomd_readb(IOMD_FIQMASK); iomd_writeb(val & ~mask, IOMD_FIQMASK); } -static void iomd_unmask_irq_fiq(struct irq_data *d) +void iomd_unmask_fiq(int fiq) { unsigned int val, mask; - mask = 1 << (d->irq & 7); + mask = 1 << (fiq & 7); val = iomd_readb(IOMD_FIQMASK); iomd_writeb(val | mask, IOMD_FIQMASK); } -static struct irq_chip iomd_fiq_chip = { - .irq_ack = iomd_mask_irq_fiq, - .irq_mask = iomd_mask_irq_fiq, - .irq_unmask = iomd_unmask_irq_fiq, -}; - extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end; void __init rpc_init_irq(void) @@ -155,11 +149,6 @@ void __init rpc_init_irq(void) handle_level_irq); set_irq_flags(irq, flags); break; - - case 64 ... 71: - irq_set_chip(irq, &iomd_fiq_chip); - set_irq_flags(irq, IRQF_VALID); - break; } }