Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2010 Joseph Smith <joe@settoplinux.org> |
| 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. |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <stdint.h> |
| 18 | #include <stdlib.h> |
| 19 | #include <device/pci_def.h> |
| 20 | #include <arch/io.h> |
| 21 | #include <device/pnp_def.h> |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 22 | #include <console/console.h> |
Edward O'Callaghan | 77757c2 | 2015-01-04 21:33:39 +1100 | [diff] [blame] | 23 | #include <southbridge/intel/i82801bx/i82801bx.h> |
| 24 | #include <northbridge/intel/i82810/raminit.h> |
Stefan Reinauer | ae5e11d | 2012-04-27 02:31:28 +0200 | [diff] [blame] | 25 | #include "drivers/pc80/udelay_io.c" |
Edward O'Callaghan | 77757c2 | 2015-01-04 21:33:39 +1100 | [diff] [blame] | 26 | #include <cpu/x86/bist.h> |
Edward O'Callaghan | fdceb48 | 2014-06-02 07:58:14 +1000 | [diff] [blame] | 27 | #include <superio/smsc/smscsuperio/smscsuperio.h> |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 28 | #include "gpio.c" |
Patrick Georgi | d083595 | 2010-10-05 09:07:10 +0000 | [diff] [blame] | 29 | #include <lib.h> |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 30 | |
| 31 | #define SERIAL_DEV PNP_DEV(0x4e, SMSCSUPERIO_SP1) |
| 32 | |
Aaron Durbin | a0a3727 | 2014-08-14 08:35:11 -0500 | [diff] [blame] | 33 | #include <cpu/intel/romstage.h> |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 34 | void main(unsigned long bist) |
| 35 | { |
Uwe Hermann | ab50d62 | 2010-10-13 08:21:44 +0000 | [diff] [blame] | 36 | /* Set southbridge and Super I/O GPIOs. */ |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 37 | mb_gpio_init(); |
| 38 | |
| 39 | smscsuperio_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 40 | console_init(); |
| 41 | |
| 42 | report_bist_failure(bist); |
| 43 | enable_smbus(); |
Uwe Hermann | 212d0a2 | 2010-10-13 23:00:41 +0000 | [diff] [blame] | 44 | dump_spd_registers(); |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 45 | sdram_set_registers(); |
| 46 | sdram_set_spd_registers(); |
| 47 | sdram_enable(); |
Joseph Smith | b94a79f | 2010-06-21 23:25:06 +0000 | [diff] [blame] | 48 | } |