static volatile unsigned char *devCtl3Base;
static unsigned char latchU5State;
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);
struct rb500_gpio_reg __iomem *rb500_gpio_reg0;
EXPORT_SYMBOL(rb500_gpio_reg0);
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);
int rb500_gpio_direction_output(unsigned gpio, int value)
{
gpio_set_value(gpio, value);
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);