summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-06-13 08:50:58 -0400
committerTom Rini <trini@konsulko.com>2016-06-13 08:50:58 -0400
commitfd9102dafea5c6959401d0dbc5293a56d2261878 (patch)
tree5aad4472b833800daab260c94062fbaed2468d39 /drivers/gpio
parenta52142855a1345c233af8bb76fb1ad4d3048e008 (diff)
parentc1631c8a04f53e694dd73bbb987b97eed5188517 (diff)
downloadu-boot-imx-fd9102dafea5c6959401d0dbc5293a56d2261878.zip
u-boot-imx-fd9102dafea5c6959401d0dbc5293a56d2261878.tar.gz
u-boot-imx-fd9102dafea5c6959401d0dbc5293a56d2261878.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-atmel
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/at91_gpio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 75a32ee..8e52e3d 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -59,6 +59,11 @@ int at91_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)
{
struct at91_port *at91_port = at91_pio_get_port(port);
+#if defined(CPU_HAS_PIO3)
+ if (use_pullup)
+ at91_set_pio_pulldown(port, pin, 0);
+#endif
+
if (at91_port && (pin < GPIO_PER_BANK))
at91_set_port_pullup(at91_port, pin, use_pullup);
@@ -305,10 +310,10 @@ int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on)
if (at91_port && (pin < GPIO_PER_BANK)) {
mask = 1 << pin;
- writel(mask, &at91_port->pudr);
- if (is_on)
+ if (is_on) {
+ at91_set_pio_pullup(port, pin, 0);
writel(mask, &at91_port->ppder);
- else
+ } else
writel(mask, &at91_port->ppddr);
}