Changeset 18036


Ignore:
Timestamp:
2009-10-11T21:50:16+02:00 (8 years ago)
Author:
nbd
Message:

atheros: leave the gpio interrupts alone when user space changes the gpio input settings, fixes #4493

Location:
trunk/target/linux/atheros
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/atheros/patches-2.6.30/100-board.patch

    r17145 r18036  
    21062106--- /dev/null 
    21072107+++ b/arch/mips/ar231x/ar2315.c 
    2108 @@ -0,0 +1,643 @@ 
     2108@@ -0,0 +1,658 @@ 
    21092109+/* 
    21102110+ * This file is subject to the terms and conditions of the GNU General Public 
     
    21642164+               ar231x_write_reg(AR2315_ISR, AR2315_ISR_GPIO); 
    21652165+ 
     2166+       /* Enable interrupt with edge detection */ 
     2167+       if ((ar231x_read_reg(AR2315_GPIO_CR) & AR2315_GPIO_CR_M(bit)) != AR2315_GPIO_CR_I(bit)) 
     2168+               return; 
     2169+ 
    21662170+       if (bit >= 0) 
    21672171+               do_IRQ(AR531X_GPIO_IRQ_BASE + bit); 
     
    22212225+       unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; 
    22222226+ 
     2227+       /* Enable interrupt with edge detection */ 
     2228+       if ((ar231x_read_reg(AR2315_GPIO_CR) & AR2315_GPIO_CR_M(gpio)) != AR2315_GPIO_CR_I(gpio)) 
     2229+               return; 
     2230+ 
     2231+       gpiointmask |= (1 << gpio); 
     2232+       ar2315_set_gpiointmask(gpio, 3); 
     2233+} 
     2234+ 
     2235+static unsigned int ar2315_gpio_intr_startup(unsigned int irq) 
     2236+{ 
     2237+       unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; 
     2238+ 
    22232239+       /* reconfigure GPIO line as input */ 
    22242240+       ar231x_mask_reg(AR2315_GPIO_CR, AR2315_GPIO_CR_M(gpio), AR2315_GPIO_CR_I(gpio)); 
    2225 + 
    2226 +       /* Enable interrupt with edge detection */ 
    2227 +       gpiointmask |= (1 << gpio); 
    2228 +       ar2315_set_gpiointmask(gpio, 3); 
     2241+       ar2315_gpio_intr_enable(irq); 
     2242+       return 0; 
    22292243+} 
    22302244+ 
     
    22472261+static struct irq_chip ar2315_gpio_intr_controller = { 
    22482262+       .typename       = "AR2315-GPIO", 
     2263+       .startup  = ar2315_gpio_intr_startup, 
    22492264+       .ack      = ar2315_gpio_intr_disable, 
    22502265+       .mask_ack = ar2315_gpio_intr_disable, 
  • trunk/target/linux/atheros/patches-2.6.30/105-ar2315_pci.patch

    r16288 r18036  
    257257--- a/arch/mips/ar231x/ar2315.c 
    258258+++ b/arch/mips/ar231x/ar2315.c 
    259 @@ -59,6 +59,27 @@ static inline void ar2315_gpio_irq(void) 
     259@@ -63,6 +63,27 @@ static inline void ar2315_gpio_irq(void) 
    260260                do_IRQ(AR531X_GPIO_IRQ_BASE + bit); 
    261261 } 
     
    285285 /* 
    286286  * Called when an interrupt is received, this function 
    287 @@ -77,6 +98,10 @@ ar2315_irq_dispatch(void) 
     287@@ -81,6 +102,10 @@ ar2315_irq_dispatch(void) 
    288288                do_IRQ(AR2315_IRQ_WLAN0_INTRS); 
    289289        else if (pending & CAUSEF_IP4) 
  • trunk/target/linux/atheros/patches-2.6.31/100-board.patch

    r17700 r18036  
    21082108--- /dev/null 
    21092109+++ b/arch/mips/ar231x/ar2315.c 
    2110 @@ -0,0 +1,643 @@ 
     2110@@ -0,0 +1,658 @@ 
    21112111+/* 
    21122112+ * This file is subject to the terms and conditions of the GNU General Public 
     
    21662166+               ar231x_write_reg(AR2315_ISR, AR2315_ISR_GPIO); 
    21672167+ 
     2168+       /* Enable interrupt with edge detection */ 
     2169+       if ((ar231x_read_reg(AR2315_GPIO_CR) & AR2315_GPIO_CR_M(bit)) != AR2315_GPIO_CR_I(bit)) 
     2170+               return; 
     2171+ 
    21682172+       if (bit >= 0) 
    21692173+               do_IRQ(AR531X_GPIO_IRQ_BASE + bit); 
     
    22232227+       unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; 
    22242228+ 
     2229+       /* Enable interrupt with edge detection */ 
     2230+       if ((ar231x_read_reg(AR2315_GPIO_CR) & AR2315_GPIO_CR_M(gpio)) != AR2315_GPIO_CR_I(gpio)) 
     2231+               return; 
     2232+ 
     2233+       gpiointmask |= (1 << gpio); 
     2234+       ar2315_set_gpiointmask(gpio, 3); 
     2235+} 
     2236+ 
     2237+static unsigned int ar2315_gpio_intr_startup(unsigned int irq) 
     2238+{ 
     2239+       unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; 
     2240+ 
    22252241+       /* reconfigure GPIO line as input */ 
    22262242+       ar231x_mask_reg(AR2315_GPIO_CR, AR2315_GPIO_CR_M(gpio), AR2315_GPIO_CR_I(gpio)); 
    2227 + 
    2228 +       /* Enable interrupt with edge detection */ 
    2229 +       gpiointmask |= (1 << gpio); 
    2230 +       ar2315_set_gpiointmask(gpio, 3); 
     2243+       ar2315_gpio_intr_enable(irq); 
     2244+       return 0; 
    22312245+} 
    22322246+ 
     
    22492263+static struct irq_chip ar2315_gpio_intr_controller = { 
    22502264+       .typename       = "AR2315-GPIO", 
     2265+       .startup  = ar2315_gpio_intr_startup, 
    22512266+       .ack      = ar2315_gpio_intr_disable, 
    22522267+       .mask_ack = ar2315_gpio_intr_disable, 
  • trunk/target/linux/atheros/patches-2.6.31/105-ar2315_pci.patch

    r17700 r18036  
    257257--- a/arch/mips/ar231x/ar2315.c 
    258258+++ b/arch/mips/ar231x/ar2315.c 
    259 @@ -59,6 +59,27 @@ static inline void ar2315_gpio_irq(void) 
     259@@ -63,6 +63,27 @@ static inline void ar2315_gpio_irq(void) 
    260260                do_IRQ(AR531X_GPIO_IRQ_BASE + bit); 
    261261 } 
     
    285285 /* 
    286286  * Called when an interrupt is received, this function 
    287 @@ -77,6 +98,10 @@ ar2315_irq_dispatch(void) 
     287@@ -81,6 +102,10 @@ ar2315_irq_dispatch(void) 
    288288                do_IRQ(AR2315_IRQ_WLAN0_INTRS); 
    289289        else if (pending & CAUSEF_IP4) 
Note: See TracChangeset for help on using the changeset viewer.