summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2013-02-14 15:50:53 -0800
committerDavid Hendricks <dhendrix@chromium.org>2013-02-15 01:11:07 +0100
commit5ae44ded5cf5b8b9e0337feb6aa5ea42cda828ca (patch)
tree97d5977a856d199555a3906cfc44b72992394cd0 /src/include
parent8e7b3c458c176bcb9b72de94fe4c8794566b4555 (diff)
Drop include/arch-generic/div64.h
It's unused. Change-Id: Id67ca754ff7ad148ff1ecd4f1e5c986a4e7585a8 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/2400 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/arch-generic/div64.h61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/include/arch-generic/div64.h b/src/include/arch-generic/div64.h
deleted file mode 100644
index 08db225d3f..0000000000
--- a/src/include/arch-generic/div64.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef ARCH_GENERIC_DIV64_H
-#define ARCH_GENERIC_DIV64_H
-/*
- * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com>
- * Based on former asm-ppc/div64.h and asm-m68knommu/div64.h
- *
- * The semantics of do_div() are:
- *
- * uint32_t do_div(uint64_t *n, uint32_t base)
- * {
- * uint32_t remainder = *n % base;
- * *n = *n / base;
- * return remainder;
- * }
- *
- * NOTE: macro parameter n is evaluated multiple times,
- * beware of side effects!
- */
-
-#ifndef ULONG_MAX
-#include <limits.h>
-#endif
-#include <stdint.h>
-
-#if ULONG_MAX == 4294967295
-
-extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
-
-/* The unnecessary pointer compare is there
- * to check for type safety (n must be 64bit)
- */
-# define do_div(n,base) ({ \
- uint32_t __base = (base); \
- uint32_t __rem; \
- (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
- if (((n) >> 32) == 0) { \
- __rem = (uint32_t)(n) % __base; \
- (n) = (uint32_t)(n) / __base; \
- } else \
- __rem = __div64_32(&(n), __base); \
- __rem; \
- })
-
-#elif ULONG_MAX == 18446744073709551615
-
-# define do_div(n,base) ({ \
- uint32_t __base = (base); \
- uint32_t __rem; \
- __rem = ((uint64_t)(n)) % __base; \
- (n) = ((uint64_t)(n)) / __base; \
- __rem; \
- })
-
-
-#else /* BITS_PER_LONG == ?? */
-
-# error do_div() does not yet support the C64
-
-#endif /* BITS_PER_LONG */
-
-#endif /* ARCH_GENERIC_DIV64_H */