blob: 6e6358023fddea54d3f9863998126330d28a2c9d [file] [log] [blame]
Uwe Hermannc73fca32008-12-05 14:15:17 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2008 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 Hermannc73fca32008-12-05 14:15:17 +000015 */
16
Uwe Hermannc73fca32008-12-05 14:15:17 +000017#include <stdint.h>
18#include <device/pci_def.h>
19#include <arch/io.h>
20#include <device/pnp_def.h>
Uwe Hermannc73fca32008-12-05 14:15:17 +000021#include <stdlib.h>
Patrick Georgi12584e22010-05-08 09:14:51 +000022#include <console/console.h>
Edward O'Callaghanfdceb482014-06-02 07:58:14 +100023#include <superio/smsc/smscsuperio/smscsuperio.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +110024#include <northbridge/intel/i82810/raminit.h>
25#include <cpu/x86/bist.h>
Kyösti Mälkki07921540d2016-06-17 17:22:00 +030026#include <cpu/intel/romstage.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +110027#include <southbridge/intel/i82801ax/i82801ax.h>
Uwe Hermannab50d622010-10-13 08:21:44 +000028#include <lib.h>
Uwe Hermannc73fca32008-12-05 14:15:17 +000029
30#define SERIAL_DEV PNP_DEV(0x2e, SMSCSUPERIO_SP1)
31
Kyösti Mälkki07921540d2016-06-17 17:22:00 +030032void mainboard_romstage_entry(unsigned long bist)
Uwe Hermannc73fca32008-12-05 14:15:17 +000033{
Stefan Reinauer08670622009-06-30 15:17:49 +000034 smscsuperio_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
Uwe Hermannc73fca32008-12-05 14:15:17 +000035 console_init();
Uwe Hermannc73fca32008-12-05 14:15:17 +000036 enable_smbus();
Uwe Hermannc73fca32008-12-05 14:15:17 +000037 report_bist_failure(bist);
Uwe Hermann212d0a22010-10-13 23:00:41 +000038 dump_spd_registers();
Uwe Hermannc73fca32008-12-05 14:15:17 +000039 sdram_set_registers();
40 sdram_set_spd_registers();
41 sdram_enable();
Uwe Hermannc73fca32008-12-05 14:15:17 +000042}