diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-05 21:50:42 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-05 21:50:42 -0400 |
commit | 9933847b29bb3d3447d19236375ccc84bfbcf3df (patch) | |
tree | d8aa5a6cfc064cf668950c08f4a99418a104b950 /arch/arm/plat-s3c24xx | |
parent | 97a339995fa6224487dc026e466f5bd1bbcaa3b2 (diff) |
ARM: S3C24XX: Remove s3c2410_gpio_getcfg(), implement s3c_gpio_getcfg()
Add s3c_gpio_getcfg() and change anything using s3c2410_gpio_getcfg() to
use this instead.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r-- | arch/arm/plat-s3c24xx/gpio.c | 19 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/pm.c | 4 |
2 files changed, 2 insertions, 21 deletions
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c index 24c00470b86c..c7c0cd73b946 100644 --- a/arch/arm/plat-s3c24xx/gpio.c +++ b/arch/arm/plat-s3c24xx/gpio.c | |||
@@ -33,25 +33,6 @@ | |||
33 | 33 | ||
34 | #include <mach/regs-gpio.h> | 34 | #include <mach/regs-gpio.h> |
35 | 35 | ||
36 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) | ||
37 | { | ||
38 | void __iomem *base = S3C24XX_GPIO_BASE(pin); | ||
39 | unsigned long val = __raw_readl(base); | ||
40 | |||
41 | if (pin < S3C2410_GPIO_BANKB) { | ||
42 | val >>= S3C2410_GPIO_OFFSET(pin); | ||
43 | val &= 1; | ||
44 | val += 1; | ||
45 | } else { | ||
46 | val >>= S3C2410_GPIO_OFFSET(pin)*2; | ||
47 | val &= 3; | ||
48 | } | ||
49 | |||
50 | return val | S3C2410_GPIO_INPUT; | ||
51 | } | ||
52 | |||
53 | EXPORT_SYMBOL(s3c2410_gpio_getcfg); | ||
54 | |||
55 | void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) | 36 | void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) |
56 | { | 37 | { |
57 | void __iomem *base = S3C24XX_GPIO_BASE(pin); | 38 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c index 691fecc61d53..60627e63a254 100644 --- a/arch/arm/plat-s3c24xx/pm.c +++ b/arch/arm/plat-s3c24xx/pm.c | |||
@@ -98,11 +98,11 @@ static void s3c_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs) | |||
98 | else | 98 | else |
99 | irqstate = s3c_irqwake_eintmask & (1L<<irqoffs); | 99 | irqstate = s3c_irqwake_eintmask & (1L<<irqoffs); |
100 | 100 | ||
101 | pinstate = s3c2410_gpio_getcfg(pin); | 101 | pinstate = s3c_gpio_getcfg(pin); |
102 | 102 | ||
103 | if (!irqstate) { | 103 | if (!irqstate) { |
104 | if (pinstate == S3C2410_GPIO_IRQ) | 104 | if (pinstate == S3C2410_GPIO_IRQ) |
105 | S3C_PMDBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin); | 105 | S3C_PMDBG("Leaving IRQ %d (pin %d) as is\n", irq, pin); |
106 | } else { | 106 | } else { |
107 | if (pinstate == S3C2410_GPIO_IRQ) { | 107 | if (pinstate == S3C2410_GPIO_IRQ) { |
108 | S3C_PMDBG("Disabling IRQ %d (pin %d)\n", irq, pin); | 108 | S3C_PMDBG("Disabling IRQ %d (pin %d)\n", irq, pin); |