projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "ppc/85xx/pci: fsl_pci_init: pcie agent mode support"
[oweals/u-boot.git]
/
include
/
div64.h
diff --git
a/include/div64.h
b/include/div64.h
index c495aefb01480068487dae545a99e45412e45b3f..d83314435d860d59ffb9d5a14284d70a3c3a4453 100644
(file)
--- a/
include/div64.h
+++ b/
include/div64.h
@@
-36,4
+36,14
@@
extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
__rem; \
})
__rem; \
})
+/* Wrapper for do_div(). Doesn't modify dividend and returns
+ * the result, not reminder.
+ */
+static inline uint64_t lldiv(uint64_t dividend, uint32_t divisor)
+{
+ uint64_t __res = dividend;
+ do_div(__res, divisor);
+ return(__res);
+}
+
#endif /* _ASM_GENERIC_DIV64_H */
#endif /* _ASM_GENERIC_DIV64_H */