Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45922
b: refs/heads/master
c: 30f0e0f
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Jan 24, 2007
1 parent 9ecc357 commit cdcb463
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c3c5bb3c68b932ece9f92b9d201196d537cb99c
refs/heads/master: 30f0e0f4153918a22d802b415980974514139389
11 changes: 7 additions & 4 deletions trunk/arch/arm/mach-s3c2410/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,18 @@ EXPORT_SYMBOL(s3c2410_gpio_cfgpin);
unsigned int s3c2410_gpio_getcfg(unsigned int pin)
{
void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long mask;
unsigned long val = __raw_readl(base);

if (pin < S3C2410_GPIO_BANKB) {
mask = 1 << S3C2410_GPIO_OFFSET(pin);
val >>= S3C2410_GPIO_OFFSET(pin);
val &= 1;
val += 1;
} else {
mask = 3 << S3C2410_GPIO_OFFSET(pin)*2;
val >>= S3C2410_GPIO_OFFSET(pin)*2;
val &= 3;
}

return __raw_readl(base) & mask;
return val | S3C2410_GPIO_INPUT;
}

EXPORT_SYMBOL(s3c2410_gpio_getcfg);
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/arm/mach-s3c2410/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,15 +451,14 @@ static void s3c2410_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
irqstate = s3c_irqwake_eintmask & (1L<<irqoffs);

pinstate = s3c2410_gpio_getcfg(pin);
pinstate >>= S3C2410_GPIO_OFFSET(pin)*2;

if (!irqstate) {
if (pinstate == 0x02)
if (pinstate == S3C2410_GPIO_IRQ)
DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin);
} else {
if (pinstate == 0x02) {
if (pinstate == S3C2410_GPIO_IRQ) {
DBG("Disabling IRQ %d (pin %d)\n", irq, pin);
s3c2410_gpio_cfgpin(pin, 0x00);
s3c2410_gpio_cfgpin(pin, S3C2410_GPIO_INPUT);
}
}
}
Expand Down

0 comments on commit cdcb463

Please sign in to comment.