From: Axel Lin Date: Sat, 15 Jun 2013 09:56:59 +0000 (+0800) Subject: gpio: s3c2440_gpio: Fix wrong writel arguments X-Git-Tag: v2013.07-rc3~4^2~6^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=79a6fcf2573e1a2ccdc8703f8e62d6efe890fdf4;p=u-boot gpio: s3c2440_gpio: Fix wrong writel arguments Current code had writel arguments the wrong way around, fix it. Signed-off-by: Axel Lin Reviewed-by: Marek Vasut Signed-off-by: Minkyu Kang --- diff --git a/drivers/gpio/s3c2440_gpio.c b/drivers/gpio/s3c2440_gpio.c index 43bbf1160c..09b04eb94a 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); }