blob: 214cb213687fdd95d8860ad8a5d77968c8542600 [file] [log] [blame]
zbao323a9232012-07-19 16:39:01 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2012 Advanced Micro Devices, Inc.
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; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Paul Menzela46a7122013-02-23 18:37:27 +010017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
zbao323a9232012-07-19 16:39:01 +080018 */
19
20#include <console/console.h>
21#include <device/device.h>
22#include <device/pci.h>
23#include <arch/io.h>
zbao323a9232012-07-19 16:39:01 +080024#include <cpu/x86/msr.h>
Martin Roth73e86a82013-01-17 16:28:30 -070025#include "BiosCallOuts.h"
zbao323a9232012-07-19 16:39:01 +080026#include <cpu/amd/mtrr.h>
27#include <device/pci_def.h>
28#include <arch/acpi.h>
zbao323a9232012-07-19 16:39:01 +080029#include <cpu/amd/agesa/s3_resume.h>
zbao323a9232012-07-19 16:39:01 +080030#include "agesawrapper.h"
31
32/*************************************************
33 * enable the dedicated function in parmer board.
34 *************************************************/
Paul Menzel528640d2013-02-23 21:31:23 +010035static void mainboard_enable(device_t dev)
zbao323a9232012-07-19 16:39:01 +080036{
37 printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
Kyösti Mälkki6a089e32014-06-27 13:32:59 +030038
39 if (acpi_is_wakeup_s3())
zbao323a9232012-07-19 16:39:01 +080040 agesawrapper_fchs3earlyrestore();
zbao323a9232012-07-19 16:39:01 +080041}
42
zbao323a9232012-07-19 16:39:01 +080043struct chip_operations mainboard_ops = {
Paul Menzel528640d2013-02-23 21:31:23 +010044 .enable_dev = mainboard_enable,
zbao323a9232012-07-19 16:39:01 +080045};