Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101451
b: refs/heads/master
c: 1447600
h: refs/heads/master
i:
  101449: add9452
  101447: ed99584
v: v3
  • Loading branch information
Atsushi Nemoto authored and Ralf Baechle committed Jul 15, 2008
1 parent 2e8f3dc commit 676b29c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 315806cb19f9d375dccbc2d60fa14e16afdcd5ac
refs/heads/master: 14476007c90005c8992b786c15a59cca31f53268
10 changes: 6 additions & 4 deletions trunk/arch/mips/kernel/gpio_txx9.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,25 @@ static void txx9_gpio_set(struct gpio_chip *chip, unsigned int offset,

static int txx9_gpio_dir_in(struct gpio_chip *chip, unsigned int offset)
{
spin_lock_irq(&txx9_gpio_lock);
unsigned long flags;
spin_lock_irqsave(&txx9_gpio_lock, flags);
__raw_writel(__raw_readl(&txx9_pioptr->dir) & ~(1 << offset),
&txx9_pioptr->dir);
mmiowb();
spin_unlock_irq(&txx9_gpio_lock);
spin_unlock_irqrestore(&txx9_gpio_lock, flags);
return 0;
}

static int txx9_gpio_dir_out(struct gpio_chip *chip, unsigned int offset,
int value)
{
spin_lock_irq(&txx9_gpio_lock);
unsigned long flags;
spin_lock_irqsave(&txx9_gpio_lock, flags);
txx9_gpio_set_raw(offset, value);
__raw_writel(__raw_readl(&txx9_pioptr->dir) | (1 << offset),
&txx9_pioptr->dir);
mmiowb();
spin_unlock_irq(&txx9_gpio_lock);
spin_unlock_irqrestore(&txx9_gpio_lock, flags);
return 0;
}

Expand Down

0 comments on commit 676b29c

Please sign in to comment.