Anders Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 1 | /* |
| 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 Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 16 | */ |
| 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 Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 23 | #include <console/console.h> |
Edward O'Callaghan | 77757c2 | 2015-01-04 21:33:39 +1100 | [diff] [blame] | 24 | #include <southbridge/intel/i82801ax/i82801ax.h> |
| 25 | #include <northbridge/intel/i82810/raminit.h> |
Stefan Reinauer | ae5e11d | 2012-04-27 02:31:28 +0200 | [diff] [blame] | 26 | #include "drivers/pc80/udelay_io.c" |
Edward O'Callaghan | 77757c2 | 2015-01-04 21:33:39 +1100 | [diff] [blame] | 27 | #include <cpu/x86/bist.h> |
Edward O'Callaghan | f292002 | 2014-04-27 00:41:50 +1000 | [diff] [blame] | 28 | #include <superio/ite/common/ite.h> |
| 29 | #include <superio/ite/it8712f/it8712f.h> |
Uwe Hermann | ab50d62 | 2010-10-13 08:21:44 +0000 | [diff] [blame] | 30 | #include <lib.h> |
Anders Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 31 | |
Edward O'Callaghan | f292002 | 2014-04-27 00:41:50 +1000 | [diff] [blame] | 32 | #define SERIAL_DEV PNP_DEV(0x2e, IT8712F_SP1) |
| 33 | #define CLKIN_DEV PNP_DEV(0x2e, IT8712F_GPIO) |
| 34 | |
Aaron Durbin | a0a3727 | 2014-08-14 08:35:11 -0500 | [diff] [blame] | 35 | #include <cpu/intel/romstage.h> |
Uwe Hermann | ab50d62 | 2010-10-13 08:21:44 +0000 | [diff] [blame] | 36 | void main(unsigned long bist) |
Anders Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 37 | { |
Edward O'Callaghan | f292002 | 2014-04-27 00:41:50 +1000 | [diff] [blame] | 38 | ite_conf_clkin(CLKIN_DEV, ITE_UART_CLK_PREDIVIDE_24); |
| 39 | ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); |
Anders Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 40 | 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 Jenbo | a06f950 | 2010-06-09 08:08:12 +0000 | [diff] [blame] | 48 | } |