Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210795
b: refs/heads/master
c: cbd2780
h: refs/heads/master
i:
  210793: 01803d7
  210791: cbbbe59
v: v3
  • Loading branch information
Kukjin Kim committed Sep 14, 2010
1 parent 9781e79 commit b05db2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 0770e5280efd6f0001972a2b5127dffad0e22591
refs/heads/master: cbd2780fcefc370732c1f1526fb784573308177d
7 changes: 4 additions & 3 deletions trunk/arch/arm/plat-samsung/gpio-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin)
if (!chip)
return -EINVAL;

off = chip->chip.base - pin;
off = pin - chip->chip.base;
shift = off * 2;
reg = chip->base + 0x0C;

drvstr = __raw_readl(reg);
drvstr = 0xffff & (0x3 << shift);
drvstr = drvstr >> shift;
drvstr &= 0x3;

return (__force s5p_gpio_drvstr_t)drvstr;
}
Expand All @@ -296,11 +296,12 @@ int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr)
if (!chip)
return -EINVAL;

off = chip->chip.base - pin;
off = pin - chip->chip.base;
shift = off * 2;
reg = chip->base + 0x0C;

tmp = __raw_readl(reg);
tmp &= ~(0x3 << shift);
tmp |= drvstr << shift;

__raw_writel(tmp, reg);
Expand Down

0 comments on commit b05db2b

Please sign in to comment.