aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rb532/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-04-20 16:32:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-04-20 16:32:28 +0000
commitdfd186b8619fb173eef7d9ca4c24f44594d906f5 (patch)
treea2d45ecc5f26a739135a681cb482b2ccc8ba3a4e /target/linux/rb532/files
parent85cea96c2d2e7b6965d472994271b6b8d6e88b75 (diff)
downloadupstream-dfd186b8619fb173eef7d9ca4c24f44594d906f5.tar.gz
upstream-dfd186b8619fb173eef7d9ca4c24f44594d906f5.tar.bz2
upstream-dfd186b8619fb173eef7d9ca4c24f44594d906f5.zip
fix gpio on rb532 - fixes the cf driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10888 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532/files')
-rw-r--r--target/linux/rb532/files/arch/mips/rb500/gpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/rb532/files/arch/mips/rb500/gpio.c b/target/linux/rb532/files/arch/mips/rb500/gpio.c
index f7c417355a..6c92a8fe56 100644
--- a/target/linux/rb532/files/arch/mips/rb500/gpio.c
+++ b/target/linux/rb532/files/arch/mips/rb500/gpio.c
@@ -43,7 +43,7 @@
static volatile unsigned char *devCtl3Base;
static unsigned char latchU5State;
-static spinlock_t clu5Lock;
+static spinlock_t clu5Lock = SPIN_LOCK_UNLOCKED;
struct rb500_gpio_reg __iomem *rb500_gpio_reg0;
EXPORT_SYMBOL(rb500_gpio_reg0);
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(rb500_gpio_set_value);
int rb500_gpio_direction_input(unsigned gpio)
{
- writel(readl(&rb500_gpio_reg0->gpiocfg) | (1 << gpio), (void *)&rb500_gpio_reg0->gpiocfg);
+ writel(readl(&rb500_gpio_reg0->gpiocfg) & ~(1 << gpio), (void *)&rb500_gpio_reg0->gpiocfg);
return 0;
}
@@ -125,7 +125,7 @@ EXPORT_SYMBOL(rb500_gpio_direction_input);
int rb500_gpio_direction_output(unsigned gpio, int value)
{
gpio_set_value(gpio, value);
- writel(readl(&rb500_gpio_reg0->gpiocfg) & ~(1 << gpio), (void *)&rb500_gpio_reg0->gpiocfg);
+ writel(readl(&rb500_gpio_reg0->gpiocfg) | (1 << gpio), (void *)&rb500_gpio_reg0->gpiocfg);
return 0;
}