Move 64bit division from avr32 to generic lib
authorDirk Behme <dirk.behme@googlemail.com>
Thu, 2 Aug 2007 15:41:14 +0000 (17:41 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 10 Aug 2007 08:33:34 +0000 (10:33 +0200)
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>
include/div64.h [moved from include/asm-avr32/div64.h with 100% similarity]
lib_avr32/Makefile
lib_generic/Makefile
lib_generic/div64.c [moved from lib_avr32/div64.c with 97% similarity]

similarity index 100%
rename from include/asm-avr32/div64.h
rename to include/div64.h
index cf20836..bb2938f 100644 (file)
@@ -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))
index b2091c5..bf37752 100644 (file)
@@ -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)
similarity index 97%
rename from lib_avr32/div64.c
rename to lib_generic/div64.c
index 99726e3..d9951b5 100644 (file)
@@ -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;