aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-03-08 20:34:01 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-03-08 20:34:01 +0000
commit6f08e4f46c7d7aa3e577c0a45f376ff16a66036e (patch)
tree3d81c3b01b6e8a8fcbe79037ddb20ead304e5380 /target/linux
parentfb84e2bb95bbbab9ebee09f9a9c690e7fc9f6501 (diff)
downloadupstream-6f08e4f46c7d7aa3e577c0a45f376ff16a66036e.tar.gz
upstream-6f08e4f46c7d7aa3e577c0a45f376ff16a66036e.tar.bz2
upstream-6f08e4f46c7d7aa3e577c0a45f376ff16a66036e.zip
[xbrust] Fix gpio and irq wakeup irq handling.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20070 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/xburst/files-2.6.32/arch/mips/jz4740/gpio.c6
-rw-r--r--target/linux/xburst/files-2.6.32/arch/mips/jz4740/irq.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/gpio.c b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/gpio.c
index ccaa0602a9..df5df5cd0b 100644
--- a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/gpio.c
+++ b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/gpio.c
@@ -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;
diff --git a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/irq.c b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/irq.c
index a6f4bbf28c..11e5a63f7a 100644
--- a/target/linux/xburst/files-2.6.32/arch/mips/jz4740/irq.c
+++ b/target/linux/xburst/files-2.6.32/arch/mips/jz4740/irq.c
@@ -122,11 +122,13 @@ void jz4740_intc_suspend(void)
{
jz_intc_saved = readl(jz_intc_base + JZ_REG_INTC_MASK);
writel(~jz_intc_wakeup, jz_intc_base + JZ_REG_INTC_SET_MASK);
+ writel(jz_intc_wakeup, jz_intc_base + JZ_REG_INTC_CLEAR_MASK);
}
void jz4740_intc_resume(void)
{
writel(~jz_intc_saved, jz_intc_base + JZ_REG_INTC_CLEAR_MASK);
+ writel(jz_intc_saved, jz_intc_base + JZ_REG_INTC_SET_MASK);
}
#ifdef CONFIG_DEBUG_FS