aboutsummaryrefslogtreecommitdiff
path: root/drivers/ddr/marvell/a38x/mv_ddr_common.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-05-14 08:52:48 -0400
committerTom Rini <trini@konsulko.com>2018-05-14 08:52:48 -0400
commitca70cbabdcd19bf157ae4fa984559b126071ccff (patch)
tree2db6b282255ccfcef564a5c9995aeb6831f221f8 /drivers/ddr/marvell/a38x/mv_ddr_common.h
parent62d77cea31216cad526e5f45c88e8377efc6fcae (diff)
parentca734a875dec089c3978663a0ce303d776365b20 (diff)
Merge git://git.denx.de/u-boot-marvell
Diffstat (limited to 'drivers/ddr/marvell/a38x/mv_ddr_common.h')
-rw-r--r--drivers/ddr/marvell/a38x/mv_ddr_common.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/ddr/marvell/a38x/mv_ddr_common.h b/drivers/ddr/marvell/a38x/mv_ddr_common.h
new file mode 100644
index 0000000000..c71ff442ed
--- /dev/null
+++ b/drivers/ddr/marvell/a38x/mv_ddr_common.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) Marvell International Ltd. and its affiliates
+ */
+
+#ifndef _MV_DDR_COMMON_H
+#define _MV_DDR_COMMON_H
+
+extern const char mv_ddr_build_message[];
+extern const char mv_ddr_version_string[];
+
+#define MV_DDR_NUM_BITS_IN_BYTE 8
+#define MV_DDR_MEGA_BITS (1024 * 1024)
+#define MV_DDR_32_BITS_MASK 0xffffffff
+
+unsigned int ceil_div(unsigned int x, unsigned int y);
+unsigned int time_to_nclk(unsigned int t, unsigned int tclk);
+int round_div(unsigned int dividend, unsigned int divisor, unsigned int *quotient);
+
+#endif /* _MV_DDR_COMMON_H */