2 * This file is part of the coreboot project.
4 * Copyright (C) 2009 One Laptop per Child, Association, Inc.
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; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <sdram_mode.h>
24 #if CONFIG_DEBUG_RAM_SETUP
25 #define PRINT_DEBUG_MEM(x) print_debug(x)
26 #define PRINT_DEBUG_MEM_HEX8(x) print_debug_hex8(x)
27 #define PRINT_DEBUG_MEM_HEX16(x) print_debug_hex16(x)
28 #define PRINT_DEBUG_MEM_HEX32(x) print_debug_hex32(x)
29 #define DUMPNORTH() dump_pci_device(PCI_DEV(0, 0, 0))
31 #define PRINT_DEBUG_MEM(x)
32 #define PRINT_DEBUG_MEM_HEX8(x)
33 #define PRINT_DEBUG_MEM_HEX16(x)
34 #define PRINT_DEBUG_MEM_HEX32(x)
37 #include "northbridge/via/vx800/translator_ddr2_init.c"
38 #include "northbridge/via/vx800/dram_init.h"
39 #include "northbridge/via/vx800/vx800_early_smbus.c"
40 #include "northbridge/via/vx800/vx800_early_serial.c"
41 #include "northbridge/via/vx800/dram_util.h"
42 #include "northbridge/via/vx800/dram_util.c"
43 #include "northbridge/via/vx800/detection.c"
44 #include "northbridge/via/vx800/freq_setting.c"
45 #include "northbridge/via/vx800/timing_setting.c"
46 #include "northbridge/via/vx800/drdy_bl.c"
47 #include "northbridge/via/vx800/driving_setting.c"
48 #include "northbridge/via/vx800/clk_ctrl.c"
49 #include "northbridge/via/vx800/dev_init.c"
50 #include "northbridge/via/vx800/rank_map.c"
51 #include "northbridge/via/vx800/dqs_search.c"
52 #include "northbridge/via/vx800/final_setting.c"
53 #include "northbridge/via/vx800/uma_ram_setting.c"
54 #include "northbridge/via/vx800/dram_init.c"
56 * Support one dimm with up to 2 ranks
59 static void ddr2_ram_setup()
63 PRINT_DEBUG_MEM("In ddr2_ram_setup\r");
65 Status = DDR2_DRAM_INIT();
66 if (CB_SUCCESS != Status) {
67 PRINT_DEBUG_MEM("Dram init error. Status = %x\r");