Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172618
b: refs/heads/master
c: 4c8b581
h: refs/heads/master
v: v3
  • Loading branch information
Sascha Hauer committed Dec 2, 2009
1 parent c987309 commit 77481ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 9e3e7afe9bd73cc3fe0d742ba3391e864e234923
refs/heads/master: 4c8b581dd28588940a328632e406baab574e0ce5
9 changes: 7 additions & 2 deletions trunk/arch/arm/plat-mxc/audmux-v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

static void __iomem *audmux_base;

#define MXC_AUDMUX_V1_PCR(x) ((x) * 4)
static unsigned char port_mapping[] = {
0x0, 0x4, 0x8, 0x10, 0x14, 0x1c,
};

int mxc_audmux_v1_configure_port(unsigned int port, unsigned int pcr)
{
Expand All @@ -37,7 +39,10 @@ int mxc_audmux_v1_configure_port(unsigned int port, unsigned int pcr)
return -ENOSYS;
}

writel(pcr, audmux_base + MXC_AUDMUX_V1_PCR(port));
if (port >= ARRAY_SIZE(port_mapping))
return -EINVAL;

writel(pcr, audmux_base + port_mapping[port]);

return 0;
}
Expand Down

0 comments on commit 77481ad

Please sign in to comment.