blob: c71ff442edd3212b987e22e9f7f4e1207af29201 [file] [log] [blame]
Chris Packham1a07d212018-05-10 13:28:29 +12001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) Marvell International Ltd. and its affiliates
4 */
5
6#ifndef _MV_DDR_COMMON_H
7#define _MV_DDR_COMMON_H
8
9extern const char mv_ddr_build_message[];
10extern const char mv_ddr_version_string[];
11
12#define MV_DDR_NUM_BITS_IN_BYTE 8
13#define MV_DDR_MEGA_BITS (1024 * 1024)
14#define MV_DDR_32_BITS_MASK 0xffffffff
15
16unsigned int ceil_div(unsigned int x, unsigned int y);
17unsigned int time_to_nclk(unsigned int t, unsigned int tclk);
18int round_div(unsigned int dividend, unsigned int divisor, unsigned int *quotient);
19
20#endif /* _MV_DDR_COMMON_H */