summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Behme <dirk.behme@googlemail.com>2007-08-02 17:41:14 +0200
committerWolfgang Denk <wd@denx.de>2007-08-10 10:33:34 +0200
commitf7c086e94e8ce9aad7268af97f73aa6884686f27 (patch)
treef6027f3aa957584b779daeb26efba7326630a8e8
parenta22806469a8f2b69c829f4fd5361fdebd0cb01b4 (diff)
downloadu-boot-imx-f7c086e94e8ce9aad7268af97f73aa6884686f27.zip
u-boot-imx-f7c086e94e8ce9aad7268af97f73aa6884686f27.tar.gz
u-boot-imx-f7c086e94e8ce9aad7268af97f73aa6884686f27.tar.bz2
Move 64bit division from avr32 to generic lib
Move the 64bit division from lib_avr32 to lib_generic. With this, all boards can do_div/__div64_32 if needed, not only avr one. Code is put to lib_generic, so no larger memory footprint if not used. No code modifications. Thanks for proposal by HÃ¥vard Skinnemoen. Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
-rw-r--r--include/div64.h (renamed from include/asm-avr32/div64.h)0
-rw-r--r--lib_avr32/Makefile2
-rw-r--r--lib_generic/Makefile2
-rw-r--r--lib_generic/div64.c (renamed from lib_avr32/div64.c)2
4 files changed, 2 insertions, 4 deletions
diff --git a/include/asm-avr32/div64.h b/include/div64.h
index 2e0ba83..2e0ba83 100644
--- a/include/asm-avr32/div64.h
+++ b/include/div64.h
diff --git a/lib_avr32/Makefile b/lib_avr32/Makefile
index cf20836..bb2938f 100644
--- a/lib_avr32/Makefile
+++ b/lib_avr32/Makefile
@@ -29,7 +29,7 @@ LIB = $(obj)lib$(ARCH).a
SOBJS = memset.o
-COBJS = board.o interrupts.o avr32_linux.o div64.o
+COBJS = board.o interrupts.o avr32_linux.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/lib_generic/Makefile b/lib_generic/Makefile
index b2091c5..bf37752 100644
--- a/lib_generic/Makefile
+++ b/lib_generic/Makefile
@@ -27,7 +27,7 @@ LIB = $(obj)libgeneric.a
COBJS = bzlib.o bzlib_crctable.o bzlib_decompress.o \
bzlib_randtable.o bzlib_huffman.o \
- crc32.o ctype.o display_options.o ldiv.o sha1.o \
+ crc32.o ctype.o display_options.o div64.o ldiv.o sha1.o \
string.o vsprintf.o zlib.o
SRCS := $(COBJS:.o=.c)
diff --git a/lib_avr32/div64.c b/lib_generic/div64.c
index 99726e3..d9951b5 100644
--- a/lib_avr32/div64.c
+++ b/lib_generic/div64.c
@@ -18,8 +18,6 @@
#include <linux/types.h>
-#include <asm/div64.h>
-
uint32_t __div64_32(uint64_t *n, uint32_t base)
{
uint64_t rem = *n;