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. |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 15 | */ |
| 16 | |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 17 | #include <console/console.h> |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 18 | #include <stdint.h> |
| 19 | #include <string.h> |
Julius Werner | 4ee4bd5 | 2014-10-20 13:46:39 -0700 | [diff] [blame] | 20 | #include <soc/gpio.h> |
| 21 | #include <soc/pei_data.h> |
| 22 | #include <soc/pei_wrapper.h> |
| 23 | #include <soc/romstage.h> |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 24 | #include "gpio.h" |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 25 | |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 26 | void mainboard_romstage_entry(struct romstage_params *rp) |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 27 | { |
Duncan Laurie | 0aa06cb | 2014-05-14 17:03:15 -0700 | [diff] [blame] | 28 | struct pei_data pei_data; |
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 | post_code(0x32); |
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 | /* Initialize GPIOs */ |
| 33 | init_gpios(mainboard_gpio_config); |
| 34 | |
| 35 | /* Fill out PEI DATA */ |
| 36 | memset(&pei_data, 0, sizeof(pei_data)); |
| 37 | mainboard_fill_pei_data(&pei_data); |
| 38 | rp->pei_data = &pei_data; |
| 39 | |
| 40 | romstage_common(rp); |
Duncan Laurie | afad056 | 2013-01-14 08:50:03 -0800 | [diff] [blame] | 41 | } |