diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/debug-leds.c | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 21 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/gpio.h | 2 |
3 files changed, 8 insertions, 25 deletions
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index 2f4c0cabfd34..be4eefda4767 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c | |||
@@ -83,8 +83,8 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
83 | /* all leds off during suspend or shutdown */ | 83 | /* all leds off during suspend or shutdown */ |
84 | 84 | ||
85 | if (!(machine_is_omap_perseus2() || machine_is_omap_h4())) { | 85 | if (!(machine_is_omap_perseus2() || machine_is_omap_h4())) { |
86 | omap_set_gpio_dataout(GPIO_TIMER, 0); | 86 | gpio_set_value(GPIO_TIMER, 0); |
87 | omap_set_gpio_dataout(GPIO_IDLE, 0); | 87 | gpio_set_value(GPIO_IDLE, 0); |
88 | } | 88 | } |
89 | 89 | ||
90 | __raw_writew(~0, &fpga->leds); | 90 | __raw_writew(~0, &fpga->leds); |
@@ -107,7 +107,7 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
107 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) | 107 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) |
108 | hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; | 108 | hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; |
109 | else { | 109 | else { |
110 | omap_set_gpio_dataout(GPIO_TIMER, | 110 | gpio_set_value(GPIO_TIMER, |
111 | led_state & LED_TIMER_ON); | 111 | led_state & LED_TIMER_ON); |
112 | goto done; | 112 | goto done; |
113 | } | 113 | } |
@@ -121,7 +121,7 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
121 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) | 121 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) |
122 | hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; | 122 | hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; |
123 | else { | 123 | else { |
124 | omap_set_gpio_dataout(GPIO_IDLE, 1); | 124 | gpio_set_value(GPIO_IDLE, 1); |
125 | goto done; | 125 | goto done; |
126 | } | 126 | } |
127 | 127 | ||
@@ -131,7 +131,7 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
131 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) | 131 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) |
132 | hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; | 132 | hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; |
133 | else { | 133 | else { |
134 | omap_set_gpio_dataout(GPIO_IDLE, 0); | 134 | gpio_set_value(GPIO_IDLE, 0); |
135 | goto done; | 135 | goto done; |
136 | } | 136 | } |
137 | 137 | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index e07ab233e783..c0322b56efe9 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -407,20 +407,7 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | |||
407 | __raw_writel(l, reg); | 407 | __raw_writel(l, reg); |
408 | } | 408 | } |
409 | 409 | ||
410 | void omap_set_gpio_dataout(int gpio, int enable) | 410 | static int __omap_get_gpio_datain(int gpio) |
411 | { | ||
412 | struct gpio_bank *bank; | ||
413 | unsigned long flags; | ||
414 | |||
415 | if (check_gpio(gpio) < 0) | ||
416 | return; | ||
417 | bank = get_gpio_bank(gpio); | ||
418 | spin_lock_irqsave(&bank->lock, flags); | ||
419 | _set_gpio_dataout(bank, get_gpio_index(gpio), enable); | ||
420 | spin_unlock_irqrestore(&bank->lock, flags); | ||
421 | } | ||
422 | |||
423 | int omap_get_gpio_datain(int gpio) | ||
424 | { | 411 | { |
425 | struct gpio_bank *bank; | 412 | struct gpio_bank *bank; |
426 | void __iomem *reg; | 413 | void __iomem *reg; |
@@ -1258,7 +1245,7 @@ static int gpio_input(struct gpio_chip *chip, unsigned offset) | |||
1258 | 1245 | ||
1259 | static int gpio_get(struct gpio_chip *chip, unsigned offset) | 1246 | static int gpio_get(struct gpio_chip *chip, unsigned offset) |
1260 | { | 1247 | { |
1261 | return omap_get_gpio_datain(chip->base + offset); | 1248 | return __omap_get_gpio_datain(chip->base + offset); |
1262 | } | 1249 | } |
1263 | 1250 | ||
1264 | static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) | 1251 | static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) |
@@ -1755,8 +1742,6 @@ static int __init omap_gpio_sysinit(void) | |||
1755 | EXPORT_SYMBOL(omap_request_gpio); | 1742 | EXPORT_SYMBOL(omap_request_gpio); |
1756 | EXPORT_SYMBOL(omap_free_gpio); | 1743 | EXPORT_SYMBOL(omap_free_gpio); |
1757 | EXPORT_SYMBOL(omap_set_gpio_direction); | 1744 | EXPORT_SYMBOL(omap_set_gpio_direction); |
1758 | EXPORT_SYMBOL(omap_set_gpio_dataout); | ||
1759 | EXPORT_SYMBOL(omap_get_gpio_datain); | ||
1760 | 1745 | ||
1761 | arch_initcall(omap_gpio_sysinit); | 1746 | arch_initcall(omap_gpio_sysinit); |
1762 | 1747 | ||
@@ -1814,7 +1799,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused) | |||
1814 | continue; | 1799 | continue; |
1815 | 1800 | ||
1816 | irq = bank->virtual_irq_start + j; | 1801 | irq = bank->virtual_irq_start + j; |
1817 | value = omap_get_gpio_datain(gpio); | 1802 | value = gpio_get_value(gpio); |
1818 | is_in = gpio_is_input(bank, mask); | 1803 | is_in = gpio_is_input(bank, mask); |
1819 | 1804 | ||
1820 | if (bank_is_mpuio(bank)) | 1805 | if (bank_is_mpuio(bank)) |
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/mach/gpio.h index 5f996f350c84..d91ba328a309 100644 --- a/arch/arm/plat-omap/include/mach/gpio.h +++ b/arch/arm/plat-omap/include/mach/gpio.h | |||
@@ -74,8 +74,6 @@ extern int omap_gpio_init(void); /* Call from board init only */ | |||
74 | extern int omap_request_gpio(int gpio); | 74 | extern int omap_request_gpio(int gpio); |
75 | extern void omap_free_gpio(int gpio); | 75 | extern void omap_free_gpio(int gpio); |
76 | extern void omap_set_gpio_direction(int gpio, int is_input); | 76 | extern void omap_set_gpio_direction(int gpio, int is_input); |
77 | extern void omap_set_gpio_dataout(int gpio, int enable); | ||
78 | extern int omap_get_gpio_datain(int gpio); | ||
79 | extern void omap2_gpio_prepare_for_retention(void); | 77 | extern void omap2_gpio_prepare_for_retention(void); |
80 | extern void omap2_gpio_resume_after_retention(void); | 78 | extern void omap2_gpio_resume_after_retention(void); |
81 | extern void omap_set_gpio_debounce(int gpio, int enable); | 79 | extern void omap_set_gpio_debounce(int gpio, int enable); |