Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2010 coresystems GmbH |
| 5 | * Copyright (C) 2011 Google Inc. |
| 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; version 2 of the License. |
| 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. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 21 | #include <console/console.h> |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 22 | #include <stdint.h> |
| 23 | #include <string.h> |
| 24 | #include <broadwell/gpio.h> |
| 25 | #include <broadwell/pei_data.h> |
| 26 | #include <broadwell/pei_wrapper.h> |
| 27 | #include <broadwell/romstage.h> |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 28 | #include "gpio.h" |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 29 | |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 30 | void mainboard_romstage_entry(struct romstage_params *rp) |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 31 | { |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 32 | struct pei_data pei_data; |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 33 | |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 34 | post_code(0x32); |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 35 | |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 36 | /* Initialize GPIOs */ |
| 37 | init_gpios(mainboard_gpio_config); |
| 38 | |
| 39 | /* Fill out PEI DATA */ |
| 40 | memset(&pei_data, 0, sizeof(pei_data)); |
| 41 | mainboard_fill_pei_data(&pei_data); |
| 42 | rp->pei_data = &pei_data; |
| 43 | |
| 44 | romstage_common(rp); |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 45 | } |