1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #ifndef DEVICE_DRAM_COMMON_H
4 #define DEVICE_DRAM_COMMON_H
6 #include <console/console.h>
10 * \brief Convenience definitions for TCK values
12 * Different values for tCK, representing standard DDR3 frequencies.
13 * These values are in 1/256 ns units.
16 #define NS2MHZ_DIV256 (1000 << 8)
18 #define TCK_1333MHZ 192
19 #define TCK_1200MHZ 212
20 #define TCK_1100MHZ 232
21 #define TCK_1066MHZ 240
22 #define TCK_1000MHZ 256
23 #define TCK_933MHZ 274
24 #define TCK_900MHZ 284
25 #define TCK_800MHZ 320
26 #define TCK_700MHZ 365
27 #define TCK_666MHZ 384
28 #define TCK_533MHZ 480
29 #define TCK_400MHZ 640
30 #define TCK_333MHZ 768
31 #define TCK_266MHZ 960
32 #define TCK_200MHZ 1280
36 * \brief Convenience macro for enabling printk with CONFIG(DEBUG_RAM_SETUP)
38 * Use this macro instead of printk(); for verbose RAM initialization messages.
39 * When CONFIG(DEBUG_RAM_SETUP) is not selected, these messages are automatically
43 #define printram(x, ...) \
45 if (CONFIG(DEBUG_RAM_SETUP)) \
46 printk(BIOS_DEBUG, x, ##__VA_ARGS__); \
50 /** Result of the SPD decoding process */
55 SPD_STATUS_INVALID_FIELD
,
58 u16
ddr_crc16(const u8
*ptr
, int n_crc
);
60 #endif /* DEVICE_DRAM_COMMON_H */