Chris Packham | 1a07d21 | 2018-05-10 13:28:29 +1200 | [diff] [blame] | 1 | /* 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 | |
| 9 | extern const char mv_ddr_build_message[]; |
| 10 | extern 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 | |
| 16 | unsigned int ceil_div(unsigned int x, unsigned int y); |
| 17 | unsigned int time_to_nclk(unsigned int t, unsigned int tclk); |
| 18 | int round_div(unsigned int dividend, unsigned int divisor, unsigned int *quotient); |
| 19 | |
| 20 | #endif /* _MV_DDR_COMMON_H */ |