Jordan Crouse | b29209f | 2007-05-10 17:57:03 +0000 | [diff] [blame] | 1 | /* |
Stefan Reinauer | 7e61e45 | 2008-01-18 10:35:56 +0000 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Jordan Crouse | b29209f | 2007-05-10 17:57:03 +0000 | [diff] [blame] | 3 | * |
| 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 Crouse | b29209f | 2007-05-10 17:57:03 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
Ron Minnich | 5e9dc23 | 2006-07-28 16:06:16 +0000 | [diff] [blame] | 17 | #ifndef RAMINIT_H |
| 18 | #define RAMINIT_H |
| 19 | |
| 20 | #define DIMM_SOCKETS 2 |
| 21 | |
| 22 | struct mem_controller { |
| 23 | uint16_t channel0[DIMM_SOCKETS]; |
| 24 | }; |
| 25 | |
Christian Gmeiner | eb6322f | 2013-06-04 14:08:46 +0200 | [diff] [blame] | 26 | void sdram_set_registers(const struct mem_controller *ctrl); |
| 27 | void sdram_set_spd_registers(const struct mem_controller *ctrl); |
| 28 | void sdram_enable(int controllers, const struct mem_controller *ctrl); |
| 29 | |
Stefan Reinauer | e46c1c8 | 2010-04-15 23:01:59 +0000 | [diff] [blame] | 30 | void sdram_initialize(int controllers, const struct mem_controller *ctrl); |
| 31 | |
Christian Gmeiner | c4e07bb | 2013-06-04 17:34:35 +0200 | [diff] [blame] | 32 | /* mainboard specific */ |
| 33 | int spd_read_byte(unsigned device, unsigned address); |
| 34 | |
Stefan Reinauer | e46c1c8 | 2010-04-15 23:01:59 +0000 | [diff] [blame] | 35 | #endif |