blob: 73176e8e0ed41aed0189572a8cb129d2cf3ddaa8 [file] [log] [blame]
Anders Jenboa06f9502010-06-09 08:08:12 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
5 * Copyright (C) 2010 Anders Jenbo <anders@jenbo.dk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Anders Jenboa06f9502010-06-09 08:08:12 +000016 */
17
18#include <stdint.h>
19#include <stdlib.h>
20#include <device/pci_def.h>
21#include <arch/io.h>
22#include <device/pnp_def.h>
Anders Jenboa06f9502010-06-09 08:08:12 +000023#include <console/console.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +110024#include <southbridge/intel/i82801ax/i82801ax.h>
25#include <northbridge/intel/i82810/raminit.h>
Stefan Reinauerae5e11d2012-04-27 02:31:28 +020026#include "drivers/pc80/udelay_io.c"
Edward O'Callaghan77757c22015-01-04 21:33:39 +110027#include <cpu/x86/bist.h>
Edward O'Callaghanf2920022014-04-27 00:41:50 +100028#include <superio/ite/common/ite.h>
29#include <superio/ite/it8712f/it8712f.h>
Uwe Hermannab50d622010-10-13 08:21:44 +000030#include <lib.h>
Anders Jenboa06f9502010-06-09 08:08:12 +000031
Edward O'Callaghanf2920022014-04-27 00:41:50 +100032#define SERIAL_DEV PNP_DEV(0x2e, IT8712F_SP1)
33#define CLKIN_DEV PNP_DEV(0x2e, IT8712F_GPIO)
34
Aaron Durbina0a37272014-08-14 08:35:11 -050035#include <cpu/intel/romstage.h>
Uwe Hermannab50d622010-10-13 08:21:44 +000036void main(unsigned long bist)
Anders Jenboa06f9502010-06-09 08:08:12 +000037{
Edward O'Callaghanf2920022014-04-27 00:41:50 +100038 ite_conf_clkin(CLKIN_DEV, ITE_UART_CLK_PREDIVIDE_24);
39 ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
Anders Jenboa06f9502010-06-09 08:08:12 +000040 console_init();
41 report_bist_failure(bist);
42 enable_smbus();
43 dump_spd_registers();
44 sdram_set_registers();
45 sdram_set_spd_registers();
46 sdram_enable();
47 dump_spd_registers();
Anders Jenboa06f9502010-06-09 08:08:12 +000048}