diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-04 02:01:44 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-05 20:32:30 -0400 |
commit | eee2b94f01f7379940a656af8ef097749ce025b5 (patch) | |
tree | 710ff6594a5619df3ffc48b1a661ce68de5cc1a8 /arch/arm/plat-s3c24xx | |
parent | 40b956f026a3303a67d2ab7fffa2331f72e1e019 (diff) |
ARM: S3C24XX: Remove s3c2410_gpio_setcfg()
Remove the implementation of s3c2410_gpio_setcfg() as it should now be
functionally equivalent to s3c_gpio_cfgpin(), and add a wrapper for those
drivers that are still using this call.
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 | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c index 5467470badfd..0b3b2cb228ab 100644 --- a/arch/arm/plat-s3c24xx/gpio.c +++ b/arch/arm/plat-s3c24xx/gpio.c | |||
@@ -34,54 +34,6 @@ | |||
34 | 34 | ||
35 | #include <mach/regs-gpio.h> | 35 | #include <mach/regs-gpio.h> |
36 | 36 | ||
37 | void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) | ||
38 | { | ||
39 | void __iomem *base = S3C24XX_GPIO_BASE(pin); | ||
40 | unsigned long mask; | ||
41 | unsigned long con; | ||
42 | unsigned long flags; | ||
43 | |||
44 | if (pin < S3C2410_GPIO_BANKB) { | ||
45 | mask = 1 << S3C2410_GPIO_OFFSET(pin); | ||
46 | } else { | ||
47 | mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; | ||
48 | } | ||
49 | |||
50 | switch (function) { | ||
51 | case S3C2410_GPIO_LEAVE: | ||
52 | mask = 0; | ||
53 | function = 0; | ||
54 | break; | ||
55 | |||
56 | case S3C2410_GPIO_INPUT: | ||
57 | case S3C2410_GPIO_OUTPUT: | ||
58 | case S3C2410_GPIO_SFN2: | ||
59 | case S3C2410_GPIO_SFN3: | ||
60 | if (pin < S3C2410_GPIO_BANKB) { | ||
61 | function -= 1; | ||
62 | function &= 1; | ||
63 | function <<= S3C2410_GPIO_OFFSET(pin); | ||
64 | } else { | ||
65 | function &= 3; | ||
66 | function <<= S3C2410_GPIO_OFFSET(pin)*2; | ||
67 | } | ||
68 | } | ||
69 | |||
70 | /* modify the specified register wwith IRQs off */ | ||
71 | |||
72 | local_irq_save(flags); | ||
73 | |||
74 | con = __raw_readl(base + 0x00); | ||
75 | con &= ~mask; | ||
76 | con |= function; | ||
77 | |||
78 | __raw_writel(con, base + 0x00); | ||
79 | |||
80 | local_irq_restore(flags); | ||
81 | } | ||
82 | |||
83 | EXPORT_SYMBOL(s3c2410_gpio_cfgpin); | ||
84 | |||
85 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) | 37 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) |
86 | { | 38 | { |
87 | void __iomem *base = S3C24XX_GPIO_BASE(pin); | 39 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |