[kernel] fix the building of the lzo decompressor on some architectures
[openwrt.git] / target / linux / xburst / files-2.6.32 / arch / mips / jz4740 / gpio.c
index ccaa060..8a99f4d 100644 (file)
@@ -312,8 +312,8 @@ static unsigned int jz_gpio_irq_startup(unsigned int irq)
 
        jz_gpio_set_irq_bit(irq, JZ_REG_GPIO_SELECT_SET);
 
-       jz_gpio_irq_unmask(irq);
        desc->status &= ~IRQ_MASKED;
+       jz_gpio_irq_unmask(irq);
 
        return 0;
 }
@@ -446,6 +446,7 @@ int jz_gpio_suspend(void)
                gpio = chip->gpio_chip.base;
                chip->suspend_mask = readl(GPIO_TO_REG(gpio, JZ_REG_GPIO_MASK));
                writel(~(chip->wakeup), GPIO_TO_REG(gpio, JZ_REG_GPIO_MASK_SET));
+               writel(chip->wakeup, GPIO_TO_REG(gpio, JZ_REG_GPIO_MASK_CLEAR));
        }
 
        chip = jz_gpio_chips;
@@ -459,7 +460,10 @@ int jz_gpio_resume(void)
        int i;
 
        for (i = 0; i < ARRAY_SIZE(jz_gpio_chips); ++i, ++chip) {
-               writel(~(chip->suspend_mask), GPIO_TO_REG(chip->gpio_chip.base, JZ_REG_GPIO_MASK_CLEAR));
+               writel(~(chip->suspend_mask), GPIO_TO_REG(chip->gpio_chip.base,
+                       JZ_REG_GPIO_MASK_CLEAR));
+               writel(chip->suspend_mask, GPIO_TO_REG(chip->gpio_chip.base,
+                       JZ_REG_GPIO_MASK_SET));
        }
 
        return 0;
This page took 0.03329 seconds and 4 git commands to generate.