aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/gpio.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-12 15:26:48 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 12:27:04 -0500
commit140455fa007a618d2d1bf5e6e888206534035e6f (patch)
treede32228b71e7992ad95a00756daaa2f527043c8f /arch/arm/plat-omap/gpio.c
parenta8eb7ca0cbb41c9cd379b8d2a2a5efb503aa65e9 (diff)
omap2/3/4: Replace orred CONFIG_ARCH_OMAP2/3/4 with CONFIG_ARCH_OMAP2PLUS
omap: Replace orred CONFIG_ARCH_OMAP2/3/4 with CONFIG_ARCH_OMAP2PLUS Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/gpio.c')
-rw-r--r--arch/arm/plat-omap/gpio.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 9608019fd6e4..a888304b8383 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -177,13 +177,11 @@ struct gpio_bank {
177 u16 irq; 177 u16 irq;
178 u16 virtual_irq_start; 178 u16 virtual_irq_start;
179 int method; 179 int method;
180#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2) || \ 180#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
181 defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
182 u32 suspend_wakeup; 181 u32 suspend_wakeup;
183 u32 saved_wakeup; 182 u32 saved_wakeup;
184#endif 183#endif
185#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 184#ifdef CONFIG_ARCH_OMAP2PLUS
186 defined(CONFIG_ARCH_OMAP4)
187 u32 non_wakeup_gpios; 185 u32 non_wakeup_gpios;
188 u32 enabled_non_wakeup_gpios; 186 u32 enabled_non_wakeup_gpios;
189 187
@@ -592,8 +590,7 @@ static int _get_gpio_dataout(struct gpio_bank *bank, int gpio)
592 reg += OMAP7XX_GPIO_DATA_OUTPUT; 590 reg += OMAP7XX_GPIO_DATA_OUTPUT;
593 break; 591 break;
594#endif 592#endif
595#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 593#ifdef CONFIG_ARCH_OMAP2PLUS
596 defined(CONFIG_ARCH_OMAP4)
597 case METHOD_GPIO_24XX: 594 case METHOD_GPIO_24XX:
598 reg += OMAP24XX_GPIO_DATAOUT; 595 reg += OMAP24XX_GPIO_DATAOUT;
599 break; 596 break;
@@ -684,8 +681,7 @@ void omap_set_gpio_debounce_time(int gpio, int enc_time)
684} 681}
685EXPORT_SYMBOL(omap_set_gpio_debounce_time); 682EXPORT_SYMBOL(omap_set_gpio_debounce_time);
686 683
687#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 684#ifdef CONFIG_ARCH_OMAP2PLUS
688 defined(CONFIG_ARCH_OMAP4)
689static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, 685static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
690 int trigger) 686 int trigger)
691{ 687{
@@ -856,8 +852,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
856 goto bad; 852 goto bad;
857 break; 853 break;
858#endif 854#endif
859#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 855#ifdef CONFIG_ARCH_OMAP2PLUS
860 defined(CONFIG_ARCH_OMAP4)
861 case METHOD_GPIO_24XX: 856 case METHOD_GPIO_24XX:
862 set_24xx_gpio_triggering(bank, gpio, trigger); 857 set_24xx_gpio_triggering(bank, gpio, trigger);
863 break; 858 break;
@@ -1131,8 +1126,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
1131 spin_unlock_irqrestore(&bank->lock, flags); 1126 spin_unlock_irqrestore(&bank->lock, flags);
1132 return 0; 1127 return 0;
1133#endif 1128#endif
1134#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 1129#ifdef CONFIG_ARCH_OMAP2PLUS
1135 defined(CONFIG_ARCH_OMAP4)
1136 case METHOD_GPIO_24XX: 1130 case METHOD_GPIO_24XX:
1137 if (bank->non_wakeup_gpios & (1 << gpio)) { 1131 if (bank->non_wakeup_gpios & (1 << gpio)) {
1138 printk(KERN_ERR "Unable to modify wakeup on " 1132 printk(KERN_ERR "Unable to modify wakeup on "
@@ -1227,8 +1221,7 @@ static void omap_gpio_free(struct gpio_chip *chip, unsigned offset)
1227 __raw_writel(1 << offset, reg); 1221 __raw_writel(1 << offset, reg);
1228 } 1222 }
1229#endif 1223#endif
1230#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 1224#ifdef CONFIG_ARCH_OMAP2PLUS
1231 defined(CONFIG_ARCH_OMAP4)
1232 if (bank->method == METHOD_GPIO_24XX) { 1225 if (bank->method == METHOD_GPIO_24XX) {
1233 /* Disable wake-up during idle for dynamic tick */ 1226 /* Disable wake-up during idle for dynamic tick */
1234 void __iomem *reg = bank->base + OMAP24XX_GPIO_CLEARWKUENA; 1227 void __iomem *reg = bank->base + OMAP24XX_GPIO_CLEARWKUENA;
@@ -1809,8 +1802,7 @@ static int __init _omap_gpio_init(void)
1809 gpio_count = 32; /* 7xx has 32-bit GPIOs */ 1802 gpio_count = 32; /* 7xx has 32-bit GPIOs */
1810 } 1803 }
1811 1804
1812#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 1805#ifdef CONFIG_ARCH_OMAP2PLUS
1813 defined(CONFIG_ARCH_OMAP4)
1814 if (bank->method == METHOD_GPIO_24XX) { 1806 if (bank->method == METHOD_GPIO_24XX) {
1815 static const u32 non_wakeup_gpios[] = { 1807 static const u32 non_wakeup_gpios[] = {
1816 0xe203ffc0, 0x08700040 1808 0xe203ffc0, 0x08700040
@@ -1903,8 +1895,7 @@ static int __init _omap_gpio_init(void)
1903 return 0; 1895 return 0;
1904} 1896}
1905 1897
1906#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2) || \ 1898#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
1907 defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
1908static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) 1899static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
1909{ 1900{
1910 int i; 1901 int i;
@@ -2013,8 +2004,7 @@ static struct sys_device omap_gpio_device = {
2013 2004
2014#endif 2005#endif
2015 2006
2016#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ 2007#ifdef CONFIG_ARCH_OMAP2PLUS
2017 defined(CONFIG_ARCH_OMAP4)
2018 2008
2019static int workaround_enabled; 2009static int workaround_enabled;
2020 2010
@@ -2240,8 +2230,7 @@ static int __init omap_gpio_sysinit(void)
2240 2230
2241 mpuio_init(); 2231 mpuio_init();
2242 2232
2243#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2) || \ 2233#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
2244 defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
2245 if (cpu_is_omap16xx() || cpu_class_is_omap2()) { 2234 if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
2246 if (ret == 0) { 2235 if (ret == 0) {
2247 ret = sysdev_class_register(&omap_gpio_sysclass); 2236 ret = sysdev_class_register(&omap_gpio_sysclass);
@@ -2300,8 +2289,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
2300/* FIXME for at least omap2, show pullup/pulldown state */ 2289/* FIXME for at least omap2, show pullup/pulldown state */
2301 2290
2302 irqstat = irq_desc[irq].status; 2291 irqstat = irq_desc[irq].status;
2303#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2) || \ 2292#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
2304 defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
2305 if (is_in && ((bank->suspend_wakeup & mask) 2293 if (is_in && ((bank->suspend_wakeup & mask)
2306 || irqstat & IRQ_TYPE_SENSE_MASK)) { 2294 || irqstat & IRQ_TYPE_SENSE_MASK)) {
2307 char *trigger = NULL; 2295 char *trigger = NULL;