summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/auxcr.S
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-01-15 20:17:00 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-01-17 18:50:50 +0100
commit8b99fe89561489731895b71919a57e1ee933512a (patch)
treee3c22f02de7cad8ab5f61a2e0c0c1e862f18e9b3 /arch/arm/mach-omap/auxcr.S
parent987cada74aa79b635614a94ff6e347ca91a9ad11 (diff)
downloadbarebox-8b99fe89561489731895b71919a57e1ee933512a.tar.gz
barebox-8b99fe89561489731895b71919a57e1ee933512a.tar.xz
ARM omap3: reimplement setup_auxcr in pure asm
This function consists of only inline asm statements, so use assembly in the first place. Also makes sure that the function is compiled in arm mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Sanjeev Premi <premi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap/auxcr.S')
-rw-r--r--arch/arm/mach-omap/auxcr.S33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/auxcr.S b/arch/arm/mach-omap/auxcr.S
new file mode 100644
index 0000000000..2debc15bd6
--- /dev/null
+++ b/arch/arm/mach-omap/auxcr.S
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/linkage.h>
+#include <asm/unified.h>
+
+.arm
+ENTRY(setup_auxcr)
+ mov r12, #0x3
+ mrc p15, 0, r0, c1, c0, 1
+ orr r0, r0, #0x10 @ Enable ASA
+ orr r0, r0, #1 << 5 @ Enable L1NEON
+ .word 0xE1600070 @ SMC
+ mov r12, #0x2
+ mrc p15, 1, r0, c9, c0, 2
+ @ Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround)
+ orr r0, r0, #1 << 27
+ .word 0xE1600070 @ SMC
+ bx lr
+ENDPROC(setup_auxcr)