diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-06-15 17:56:59 +0800 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2013-06-25 10:54:09 +0900 |
commit | 79a6fcf2573e1a2ccdc8703f8e62d6efe890fdf4 (patch) | |
tree | 7a80db58fb1370ffed5554653cbafd9be77d5f0d | |
parent | c5171d1c679b1c2c2697c354fe17ae0037d856e7 (diff) | |
download | u-boot-imx-79a6fcf2573e1a2ccdc8703f8e62d6efe890fdf4.zip u-boot-imx-79a6fcf2573e1a2ccdc8703f8e62d6efe890fdf4.tar.gz u-boot-imx-79a6fcf2573e1a2ccdc8703f8e62d6efe890fdf4.tar.bz2 |
gpio: s3c2440_gpio: Fix wrong writel arguments
Current code had writel arguments the wrong way around, fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r-- | drivers/gpio/s3c2440_gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/s3c2440_gpio.c b/drivers/gpio/s3c2440_gpio.c index 43bbf11..09b04eb 100644 --- a/drivers/gpio/s3c2440_gpio.c +++ b/drivers/gpio/s3c2440_gpio.c @@ -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); } |