1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-10-04 18:04:10 +03:00

[xbrust] Fix gpio and irq wakeup irq handling.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20070 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
lars 2010-03-08 20:34:01 +00:00
parent 66703ccb32
commit 114dc323ef
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -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