blob: d3ec4185568b128c7ef8f5805c6cd085398c72eb [file] [log] [blame]
Duncan Laurieafad0562013-01-14 08:50:03 -08001/*
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 Laurieafad0562013-01-14 08:50:03 -080021#include <console/console.h>
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070022#include <stdint.h>
23#include <string.h>
Julius Werner4ee4bd52014-10-20 13:46:39 -070024#include <soc/gpio.h>
25#include <soc/pei_data.h>
26#include <soc/pei_wrapper.h>
27#include <soc/romstage.h>
Duncan Laurieafad0562013-01-14 08:50:03 -080028#include "gpio.h"
Duncan Laurieafad0562013-01-14 08:50:03 -080029
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070030void mainboard_romstage_entry(struct romstage_params *rp)
Duncan Laurieafad0562013-01-14 08:50:03 -080031{
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070032 struct pei_data pei_data;
Duncan Laurieafad0562013-01-14 08:50:03 -080033
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070034 post_code(0x32);
Duncan Laurieafad0562013-01-14 08:50:03 -080035
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070036 /* 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 Laurieafad0562013-01-14 08:50:03 -080045}