blob: d83bc02f3b9fd81943fedeba681e9ec9e64f2322 [file] [log] [blame]
Uwe Hermann41b88342007-09-12 22:11:33 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Uwe Hermann41b88342007-09-12 22:11:33 +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 Hermann41b88342007-09-12 22:11:33 +000015 */
16
Uwe Hermann41b88342007-09-12 22:11:33 +000017#include <stdint.h>
18#include <device/pci_def.h>
19#include <arch/io.h>
20#include <device/pnp_def.h>
Carl-Daniel Hailfinger2ee67792008-10-01 12:52:52 +000021#include <stdlib.h>
Patrick Georgi12584e22010-05-08 09:14:51 +000022#include <console/console.h>
Edward O'Callaghanbeb0f262014-04-29 13:09:50 +100023#include <superio/winbond/common/winbond.h>
24#include <superio/winbond/w83627hf/w83627hf.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +110025#include <northbridge/intel/i82810/raminit.h>
26#include <cpu/x86/bist.h>
27#include <southbridge/intel/i82801ax/i82801ax.h>
Stefan Reinauerae5e11d2012-04-27 02:31:28 +020028#include "drivers/pc80/udelay_io.c"
Uwe Hermannab50d622010-10-13 08:21:44 +000029#include <lib.h>
Uwe Hermann41b88342007-09-12 22:11:33 +000030
31#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
Uwe Hermann9b9791c2010-12-06 18:17:01 +000032#define DUMMY_DEV PNP_DEV(0x2e, 0)
Uwe Hermann41b88342007-09-12 22:11:33 +000033
Aaron Durbina0a37272014-08-14 08:35:11 -050034#include <cpu/intel/romstage.h>
Uwe Hermannab50d622010-10-13 08:21:44 +000035void main(unsigned long bist)
Uwe Hermann41b88342007-09-12 22:11:33 +000036{
Uwe Hermann9b9791c2010-12-06 18:17:01 +000037 w83627hf_set_clksel_48(DUMMY_DEV);
Edward O'Callaghanbeb0f262014-04-29 13:09:50 +100038 winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
Uwe Hermann41b88342007-09-12 22:11:33 +000039
Uwe Hermann41b88342007-09-12 22:11:33 +000040 console_init();
Uwe Hermann3b6c5272008-11-11 14:26:03 +000041 enable_smbus();
Uwe Hermann41b88342007-09-12 22:11:33 +000042 report_bist_failure(bist);
Uwe Hermann212d0a22010-10-13 23:00:41 +000043 dump_spd_registers();
Uwe Hermann4cf5ecf2008-11-20 23:18:10 +000044 sdram_set_registers();
45 sdram_set_spd_registers();
46 sdram_enable();
Uwe Hermann41b88342007-09-12 22:11:33 +000047}