]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/gpio/s3c2440_gpio.c
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
[karo-tx-uboot.git] / drivers / gpio / s3c2440_gpio.c
index 43bbf1160c62075e89caff5bd98182d21c4934ef..09b04eb94aeb1ba681f5631dda9596e175ae2e37 100644 (file)
@@ -61,7 +61,7 @@ int gpio_set_value(unsigned gpio, int value)
        else
                l &= ~bit;
 
-       return writel(port, l);
+       return writel(l, port);
 }
 
 int gpio_get_value(unsigned gpio)
@@ -85,11 +85,11 @@ int gpio_free(unsigned gpio)
 
 int gpio_direction_input(unsigned gpio)
 {
-       return writel(GPIO_FULLPORT(gpio), GPIO_INPUT << GPIO_BIT(gpio));
+       return writel(GPIO_INPUT << GPIO_BIT(gpio), GPIO_FULLPORT(gpio));
 }
 
 int gpio_direction_output(unsigned gpio, int value)
 {
-       writel(GPIO_FULLPORT(gpio), GPIO_OUTPUT << GPIO_BIT(gpio));
+       writel(GPIO_OUTPUT << GPIO_BIT(gpio), GPIO_FULLPORT(gpio));
        return gpio_set_value(gpio, value);
 }