Browse Source

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>
Dirk Behme 17 years ago
parent
commit
f7c086e94e
4 changed files with 2 additions and 4 deletions
  1. 0 0
      include/div64.h
  2. 1 1
      lib_avr32/Makefile
  3. 1 1
      lib_generic/Makefile
  4. 0 2
      lib_generic/div64.c

+ 0 - 0
include/asm-avr32/div64.h → include/div64.h


+ 1 - 1
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))

+ 1 - 1
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)

+ 0 - 2
lib_avr32/div64.c → 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;