Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756422Ab0A0XU4 (ORCPT ); Wed, 27 Jan 2010 18:20:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755177Ab0A0XUz (ORCPT ); Wed, 27 Jan 2010 18:20:55 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:50288 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755355Ab0A0XUz (ORCPT ); Wed, 27 Jan 2010 18:20:55 -0500 Date: Wed, 27 Jan 2010 23:18:32 +0000 From: Russell King - ARM Linux To: adharmap@codeaurora.org Cc: linux-arm-kernel@lists.infradead.org, Ingo Molnar , Catalin Marinas , Yinghai Lu , Tony Lindgren , Santosh Shilimkar , Kevin Hilman , Kalle Valo , Jean Pihet , Linus Walleij , Colin Tuckley , Philby John , Srinidhi Kasagar , Alessandro Rubini , Andrea Gallo , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Abhijeet Dharmapurikar Subject: Re: [PATCH 3/5] gic: Add set_type callback Message-ID: <20100127231832.GF29665@n2100.arm.linux.org.uk> References: <1264620749-24527-1-git-send-email-adharmap@codeaurora.org> <1264620749-24527-4-git-send-email-adharmap@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1264620749-24527-4-git-send-email-adharmap@codeaurora.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 22 On Wed, Jan 27, 2010 at 11:32:27AM -0800, adharmap@codeaurora.org wrote: > + if (flow_type & (IRQ_TYPE_EDGE_RISING|IRQ_TYPE_EDGE_FALLING)) { > + reg_value |= (2< + writel(reg_value, gic_dist_base(irq) + GIC_DIST_CONFIG > + + register_index); > + __set_irq_handler_unlocked(irq, handle_edge_irq); > + } > + > + if (flow_type & (IRQ_TYPE_LEVEL_HIGH|IRQ_TYPE_LEVEL_LOW)) { This is actually where things start to get rather sticky - because there may well be on-chip inverters between the GIC and external peripherals. Since the GIC can only sense one edge or one level depending on the hardware setup, it seems wrong to allow the configuration of both high and low levels, and both edges. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/