projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e3e7af
)
i.MX27 audmux: Fix register offsets
author
Sascha Hauer
<s.hauer@pengutronix.de>
Mon, 30 Nov 2009 12:31:29 +0000
(13:31 +0100)
committer
Sascha Hauer
<s.hauer@pengutronix.de>
Wed, 2 Dec 2009 11:17:16 +0000
(12:17 +0100)
We have two holes in the register space. The driver did not
handle this. Fix it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/plat-mxc/audmux-v1.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-mxc/audmux-v1.c
b/arch/arm/plat-mxc/audmux-v1.c
index 70ab5aff2b9e7e700a90577498b1bf25a8cf8cae..da6387dcdf21897d5f118c3d238d8d92f098aa47 100644
(file)
--- a/
arch/arm/plat-mxc/audmux-v1.c
+++ b/
arch/arm/plat-mxc/audmux-v1.c
@@
-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)
{
@@
-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;
}