Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123770
b: refs/heads/master
c: 4a7b98d
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Sascha Hauer committed Dec 16, 2008
1 parent ff69c9e commit ca556c0
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 1d5aa17be13bafa6b104f4b46c958be3470b28ec
refs/heads/master: 4a7b98d7e7f1c05331bfa82e2427f896e57de35b
9 changes: 5 additions & 4 deletions trunk/arch/arm/mach-mx3/iomux.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ void mxc_iomux_set_pad(enum iomux_pins pin, u32 config)
u32 field, l;
void __iomem *reg;

reg = IOMUXSW_PAD_CTL + (pin + 2) / 3;
pin &= IOMUX_PADNUM_MASK;
reg = IOMUXSW_PAD_CTL + (pin + 2) / 3 * 4;
field = (pin + 2) % 3;

pr_debug("%s: reg offset = 0x%x field = %d\n",
pr_debug("%s: reg offset = 0x%x, field = %d\n",
__func__, (pin + 2) / 3, field);

spin_lock(&gpio_mux_lock);

l = __raw_readl(reg);
l &= ~(0x1ff << (field * 9));
l |= config << (field * 9);
l &= ~(0x1ff << (field * 10));
l |= config << (field * 10);
__raw_writel(l, reg);

spin_unlock(&gpio_mux_lock);
Expand Down

0 comments on commit ca556c0

Please sign in to comment.