Uwe Hermann | 1a9c892 | 2007-04-01 17:24: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. |
Uwe Hermann | 1a9c892 | 2007-04-01 17:24:03 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de> |
| 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. |
Uwe Hermann | 1a9c892 | 2007-04-01 17:24:03 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
Richard Smith | cb8eab4 | 2006-07-24 04:25:47 +0000 | [diff] [blame] | 17 | #ifndef RAMINIT_H |
| 18 | #define RAMINIT_H |
| 19 | |
Uwe Hermann | 1a9c892 | 2007-04-01 17:24:03 +0000 | [diff] [blame] | 20 | /* The 440BX supports up to four (single- or double-sided) DIMMs. */ |
Stefan Reinauer | 2b01a8a | 2010-05-25 16:00:08 +0000 | [diff] [blame] | 21 | #define DIMM_SOCKETS 4 |
Uwe Hermann | 1a9c892 | 2007-04-01 17:24:03 +0000 | [diff] [blame] | 22 | |
Uwe Hermann | 115c5b9 | 2010-10-09 17:00:18 +0000 | [diff] [blame] | 23 | /* Function prototypes. */ |
| 24 | int spd_read_byte(unsigned int device, unsigned int address); |
| 25 | void sdram_set_registers(void); |
| 26 | void sdram_set_spd_registers(void); |
| 27 | void sdram_enable(void); |
Keith Hui | 078e324 | 2017-07-20 21:14:21 -0400 | [diff] [blame] | 28 | /* A merger of above functions */ |
| 29 | void sdram_initialize(void); |
| 30 | |
Stefan Reinauer | 3c0bfaf | 2010-12-27 11:34:57 +0000 | [diff] [blame] | 31 | /* Debug */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 32 | #if CONFIG(DEBUG_RAM_SETUP) |
Stefan Reinauer | 3c0bfaf | 2010-12-27 11:34:57 +0000 | [diff] [blame] | 33 | void dump_spd_registers(void); |
| 34 | void dump_pci_device(unsigned dev); |
Stefan Reinauer | 1c2c750 | 2010-12-27 13:29:38 +0000 | [diff] [blame] | 35 | #else |
| 36 | #define dump_spd_registers() |
| 37 | #endif |
Uwe Hermann | 1a9c892 | 2007-04-01 17:24:03 +0000 | [diff] [blame] | 38 | #endif /* RAMINIT_H */ |