summaryrefslogtreecommitdiff
path: root/src/arch/armv7/lib
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-03-07 00:58:10 +0100
committerRonald G. Minnich <rminnich@gmail.com>2013-03-07 06:45:43 +0100
commit147cdc3b171c8f02434dc3b6bbd70b6406de93ee (patch)
tree275029b14043e06dd2a26593b74f47b7eb31ab15 /src/arch/armv7/lib
parentd9b16f3b048243fd7d4c4513875f7f241261ce50 (diff)
downloadcoreboot-147cdc3b171c8f02434dc3b6bbd70b6406de93ee.tar.xz
Revert "ARMv7: Simplify div64"
This reverts commit 1cd616082100f47dc2d6d73669c6aa2e5eb039ad Division bites us again. I don't know how or why, but printk() seems to break (again) with this patch. I'm surprised we didn't encounter problems earlier on... Change-Id: I81cb9f20879f5eb73a76e1af47b96a68d1e81dc8 TODO: Find a better solution for div64. This one is too painful, but seems necessary for now (and sort-of works with our vtxprintf hack). Reviewed-on: http://review.coreboot.org/2600 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/armv7/lib')
-rw-r--r--src/arch/armv7/lib/Makefile.inc2
-rw-r--r--src/arch/armv7/lib/div64.S9
2 files changed, 5 insertions, 6 deletions
diff --git a/src/arch/armv7/lib/Makefile.inc b/src/arch/armv7/lib/Makefile.inc
index 0e81c997a0..388864aa28 100644
--- a/src/arch/armv7/lib/Makefile.inc
+++ b/src/arch/armv7/lib/Makefile.inc
@@ -2,8 +2,6 @@ bootblock-y += syslib.c
bootblock-$(CONFIG_EARLY_CONSOLE) += early_console.c
bootblock-y += cache_v7.c
bootblock-y += cache-cp15.c
-bootblock-y += div0.c
-bootblock-y += div64.S
romstage-y += cache_v7.c
romstage-y += cache-cp15.c
diff --git a/src/arch/armv7/lib/div64.S b/src/arch/armv7/lib/div64.S
index 41a094941e..44edf480ca 100644
--- a/src/arch/armv7/lib/div64.S
+++ b/src/arch/armv7/lib/div64.S
@@ -13,7 +13,8 @@
*/
// FIXME
-#define __ARM_ARCH__ 7
+//#include <linux/linkage.h>
+#define __LINUX_ARM_ARCH__ 7
#ifdef __ARMEB__
#define xh r0
@@ -64,7 +65,7 @@ __do_div64:
@ The aligned divisor is stored in yl preserving the original.
@ The bit position is stored in ip.
-#if __ARM_ARCH__ >= 5
+#if __LINUX_ARM_ARCH__ >= 5
clz yl, r4
clz ip, xh
@@ -124,7 +125,7 @@ __do_div64:
@ We still have remainer bits in the low part. Bring them up.
-#if __ARM_ARCH__ >= 5
+#if __LINUX_ARM_ARCH__ >= 5
clz xh, xl @ we know xh is zero here so...
add xh, xh, #1
@@ -151,7 +152,7 @@ __do_div64:
8: @ Division by a power of 2: determine what that divisor order is
@ then simply shift values around
-#if __ARM_ARCH__ >= 5
+#if __LINUX_ARM_ARCH__ >= 5
clz ip, r4
rsb ip, ip, #31