2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 Alexandru Gagniuc <mr.nuke.me@gmail.com>
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #ifndef RAMINIT_VX900_H
18 #define RAMINIT_VX900_H
20 #include <device/dram/ddr3.h>
23 #define SPD_END_LIST 0xff
25 typedef struct dimm_layout_st
27 /* The address of the DIMM on the SMBUS *
28 * 0xFF to terminate the array*/
29 u8 spd_addr
[VX900_MAX_DIMM_SLOTS
+ 1];
32 typedef struct dimm_info_st
34 dimm_attr dimm
[VX900_MAX_DIMM_SLOTS
];
37 typedef struct mem_rank_st
{
42 typedef struct rank_layout_st
{
43 u32 phys_rank_size_mb
[VX900_MAX_MEM_RANKS
];
44 mem_rank virt
[VX900_MAX_MEM_RANKS
];
45 dimm_flags_t flags
[VX900_MAX_MEM_RANKS
];
48 typedef struct pci_reg8_st
{
53 typedef u8 timing_dly
[8];
55 typedef struct delay_range_st
{
61 typedef struct vx900_delay_calib_st
{
64 /* Transmit delays are calibrated for each dimm */
65 delay_range tx_dq
[VX900_MAX_DIMM_SLOTS
];
66 delay_range tx_dqs
[VX900_MAX_DIMM_SLOTS
];
69 typedef struct ramctr_timing_st
{
70 enum spd_memory_type dram_type
;
71 enum spd_dimm_type dimm_type
;
73 /* tLatencies are in units of ns, scaled by x256 */
86 /* Latencies in terms of clock cycles
87 * They are saved separately as they are needed for DRAM MRS commands*/
88 u8 CAS
; /* CAS read latency */
89 u8 CWL
; /* CAS write latency */
90 u8 WR
; /* write recovery time */
91 /* Number of dimms currently connected */
96 void vx900_init_dram_ddr3(const dimm_layout
*dimms
);
98 #endif /* RAMINIT_VX900_H */