From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sh78.surpasshosting.com (sh78.surpasshosting.com [72.29.64.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9EE3BB6F84 for ; Mon, 1 Aug 2011 01:51:54 +1000 (EST) Message-ID: <4E357A1A.1080606@embedded-sol.com> Date: Sun, 31 Jul 2011 18:51:54 +0300 From: Felix Radensky MIME-Version: 1.0 To: Wolfgang Grandegger Subject: Re: GPIO IRQ on P1022 References: <4E35309E.4000202@embedded-sol.com> <4E357285.8080708@grandegger.com> In-Reply-To: <4E357285.8080708@grandegger.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: "linuxppc-dev@ozlabs.org" , Tabi Timur-B04825 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Wolfgang, On 07/31/2011 06:19 PM, Wolfgang Grandegger wrote: > On 07/31/2011 12:38 PM, Felix Radensky wrote: >> Hi, >> >> I'm running kernel 3.0 on a custom board based on Freescale P1022. >> The interrupt line of on-board FPGA is connected to GPIO2_9. FPGA >> IRQ is level, active low. The GPIOs are mapped like this: >> >> GPIOs 160-191, /soc@ffe00000/gpio-controller@f200: >> >> GPIOs 192-223, /soc@ffe00000/gpio-controller@f100: >> >> GPIOs 224-255, /soc@ffe00000/gpio-controller@f000: >> >> I've verified that pin mixing is done correctly, and the >> FPGA IRQ line is indeed configured as GPIO. >> >> I have the following code in my driver: >> >> #define FPGA_IRQ_GPIO 169 >> >> err = gpio_request(FPGA_IRQ_GPIO, "FPGA IRQ"); >> if (err) { >> printk(KERN_ERR "Failed to request FPGA IRQ GPIO, err=%d\n", err); >> goto out; >> } >> >> gpio_direction_input(FPGA_IRQ_GPIO); >> >> irq = gpio_to_irq(FPGA_IRQ_GPIO); >> if (irq< 0) { >> printk(KERN_ERR "Failed to map FPGA GPIO to IRQ\n"); >> goto out; >> } >> >> err = request_irq(irq, gsat_interrupt, >> IRQF_TRIGGER_FALLING, DRVNAME, priv); >> >> Interrupt handler reads FPGA interrupt status register to clear >> interrupt >> and exits. >> >> What happens when I load my driver is single execution of interrupt >> handler >> followed by system freeze. Even if I call disable_irq() in interrupt >> handler the >> system still freezes. > Try disable_irq_nosync() instead. > > Thanks. However this doesn't help either. Felix.