blob: 3a5d571c76a7297c35af3d696b0180adaa76f25e [file] [log] [blame]
Jordan Crouseb29209f2007-05-10 17:57:03 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Jordan Crouseb29209f2007-05-10 17:57:03 +00003 *
4 * Copyright (C) 2007 Advanced Micro Devices, Inc.
5 *
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.
10 *
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.
Jordan Crouseb29209f2007-05-10 17:57:03 +000015 */
16
Ron Minnich5e9dc232006-07-28 16:06:16 +000017#ifndef RAMINIT_H
18#define RAMINIT_H
19
20#define DIMM_SOCKETS 2
21
22struct mem_controller {
23 uint16_t channel0[DIMM_SOCKETS];
24};
25
Christian Gmeinereb6322f2013-06-04 14:08:46 +020026void sdram_set_registers(const struct mem_controller *ctrl);
27void sdram_set_spd_registers(const struct mem_controller *ctrl);
28void sdram_enable(int controllers, const struct mem_controller *ctrl);
29
Stefan Reinauere46c1c82010-04-15 23:01:59 +000030void sdram_initialize(int controllers, const struct mem_controller *ctrl);
31
Christian Gmeinerc4e07bb2013-06-04 17:34:35 +020032/* mainboard specific */
33int spd_read_byte(unsigned device, unsigned address);
34
Stefan Reinauere46c1c82010-04-15 23:01:59 +000035#endif