blob: 448f8d69bee4d7a29634f3a1810520845d297d60 [file] [log] [blame]
Uwe Hermann1a9c8922007-04-01 17:24:03 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Uwe Hermann1a9c8922007-04-01 17:24:03 +00003 *
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 Hermann1a9c8922007-04-01 17:24:03 +000015 */
16
Richard Smithcb8eab42006-07-24 04:25:47 +000017#ifndef RAMINIT_H
18#define RAMINIT_H
19
Uwe Hermann1a9c8922007-04-01 17:24:03 +000020/* The 440BX supports up to four (single- or double-sided) DIMMs. */
Stefan Reinauer2b01a8a2010-05-25 16:00:08 +000021#define DIMM_SOCKETS 4
Uwe Hermann1a9c8922007-04-01 17:24:03 +000022
Uwe Hermann115c5b92010-10-09 17:00:18 +000023/* Function prototypes. */
24int spd_read_byte(unsigned int device, unsigned int address);
25void sdram_set_registers(void);
26void sdram_set_spd_registers(void);
27void sdram_enable(void);
Keith Hui078e3242017-07-20 21:14:21 -040028/* A merger of above functions */
29void sdram_initialize(void);
30
Stefan Reinauer3c0bfaf2010-12-27 11:34:57 +000031/* Debug */
Julius Wernercd49cce2019-03-05 16:53:33 -080032#if CONFIG(DEBUG_RAM_SETUP)
Stefan Reinauer3c0bfaf2010-12-27 11:34:57 +000033void dump_spd_registers(void);
Martin Roth468d02c2019-10-23 21:44:42 -060034void dump_pci_device(unsigned int dev);
Stefan Reinauer1c2c7502010-12-27 13:29:38 +000035#else
36#define dump_spd_registers()
37#endif
Uwe Hermann1a9c8922007-04-01 17:24:03 +000038#endif /* RAMINIT_H */