diff options
author | Fabio Estevam <festevam@gmail.com> | 2012-02-29 08:28:08 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-03-02 02:49:37 -0500 |
commit | bb07d7511e0884f913a0610d5f9a2f8a27914042 (patch) | |
tree | 45025b26ae9e27cb15b44ad2a2afe589c1077e1c /arch/arm/plat-mxc/cpu.c | |
parent | 3ac804e31199c55440a423c76068d693b37fd50b (diff) |
ARM: mx3: Setup AIPS registers
It was observed on a mx31pdk board that audio playback only worked when the bootloader was Redboot, and
did not work when U-boot was used.
Comparing the sources of these bootloaders showed that the AIPS registers were not setup in U-boot.
Instead of relying on the bootloader to setup the AIPS registers, do it in the kernel so that audio
playback can work independantly of the bootloader being used.
Copied the AIPS settings from Redboot to the kernel.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/cpu.c')
-rw-r--r-- | arch/arm/plat-mxc/cpu.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c index f5b7e0fa237f..220dd6f93126 100644 --- a/arch/arm/plat-mxc/cpu.c +++ b/arch/arm/plat-mxc/cpu.c | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/io.h> | ||
3 | #include <mach/hardware.h> | 4 | #include <mach/hardware.h> |
4 | 5 | ||
5 | unsigned int __mxc_cpu_type; | 6 | unsigned int __mxc_cpu_type; |
@@ -18,3 +19,26 @@ void imx_print_silicon_rev(const char *cpu, int srev) | |||
18 | pr_info("CPU identified as %s, silicon rev %d.%d\n", | 19 | pr_info("CPU identified as %s, silicon rev %d.%d\n", |
19 | cpu, (srev >> 4) & 0xf, srev & 0xf); | 20 | cpu, (srev >> 4) & 0xf, srev & 0xf); |
20 | } | 21 | } |
22 | |||
23 | void __init imx_set_aips(void __iomem *base) | ||
24 | { | ||
25 | unsigned int reg; | ||
26 | /* | ||
27 | * Set all MPROTx to be non-bufferable, trusted for R/W, | ||
28 | * not forced to user-mode. | ||
29 | */ | ||
30 | __raw_writel(0x77777777, base + 0x0); | ||
31 | __raw_writel(0x77777777, base + 0x4); | ||
32 | |||
33 | /* | ||
34 | * Set all OPACRx to be non-bufferable, to not require | ||
35 | * supervisor privilege level for access, allow for | ||
36 | * write access and untrusted master access. | ||
37 | */ | ||
38 | __raw_writel(0x0, base + 0x40); | ||
39 | __raw_writel(0x0, base + 0x44); | ||
40 | __raw_writel(0x0, base + 0x48); | ||
41 | __raw_writel(0x0, base + 0x4C); | ||
42 | reg = __raw_readl(base + 0x50) & 0x00FFFFFF; | ||
43 | __raw_writel(reg, base + 0x50); | ||
44 | } | ||