blob: 3c9bb36363800accbb575b44cf4b6c53bf00dd70 [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.
Duncan Laurieafad0562013-01-14 08:50:03 -080015 */
16
Duncan Laurieafad0562013-01-14 08:50:03 -080017#include <console/console.h>
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070018#include <stdint.h>
19#include <string.h>
Julius Werner4ee4bd52014-10-20 13:46:39 -070020#include <soc/gpio.h>
21#include <soc/pei_data.h>
22#include <soc/pei_wrapper.h>
23#include <soc/romstage.h>
Duncan Laurieafad0562013-01-14 08:50:03 -080024#include "gpio.h"
Duncan Laurieafad0562013-01-14 08:50:03 -080025
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070026void mainboard_romstage_entry(struct romstage_params *rp)
Duncan Laurieafad0562013-01-14 08:50:03 -080027{
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070028 struct pei_data pei_data;
Duncan Laurieafad0562013-01-14 08:50:03 -080029
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070030 post_code(0x32);
Duncan Laurieafad0562013-01-14 08:50:03 -080031
Duncan Laurie0aa06cb2014-05-14 17:03:15 -070032 /* 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 Laurieafad0562013-01-14 08:50:03 -080041}