mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-26 02:55:32 +02:00
fix gpio on rb532 - fixes the cf driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10888 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b153f66ff2
commit
3f8ac58c32
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
static volatile unsigned char *devCtl3Base;
|
static volatile unsigned char *devCtl3Base;
|
||||||
static unsigned char latchU5State;
|
static unsigned char latchU5State;
|
||||||
static spinlock_t clu5Lock;
|
static spinlock_t clu5Lock = SPIN_LOCK_UNLOCKED;
|
||||||
|
|
||||||
struct rb500_gpio_reg __iomem *rb500_gpio_reg0;
|
struct rb500_gpio_reg __iomem *rb500_gpio_reg0;
|
||||||
EXPORT_SYMBOL(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)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ EXPORT_SYMBOL(rb500_gpio_direction_input);
|
|||||||
int rb500_gpio_direction_output(unsigned gpio, int value)
|
int rb500_gpio_direction_output(unsigned gpio, int value)
|
||||||
{
|
{
|
||||||
gpio_set_value(gpio, 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user