WANG Siyuan | f77f734 | 2013-08-13 17:09:51 +0800 | [diff] [blame] | 1 | /* |
| 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. |
WANG Siyuan | f77f734 | 2013-08-13 17:09:51 +0800 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <console/console.h> |
| 17 | #include <device/device.h> |
| 18 | #include <device/pci.h> |
| 19 | #include <arch/io.h> |
| 20 | #include <cpu/x86/msr.h> |
| 21 | #include <cpu/amd/mtrr.h> |
| 22 | #include <device/pci_def.h> |
| 23 | #include <arch/acpi.h> |
Kyösti Mälkki | 26f297e | 2014-05-26 11:27:54 +0300 | [diff] [blame] | 24 | #include <northbridge/amd/agesa/BiosCallOuts.h> |
Kyösti Mälkki | f21c2ac | 2014-10-19 09:35:18 +0300 | [diff] [blame] | 25 | #include <northbridge/amd/agesa/agesawrapper.h> |
WANG Siyuan | f77f734 | 2013-08-13 17:09:51 +0800 | [diff] [blame] | 26 | |
| 27 | /********************************************** |
| 28 | * enable the dedicated function in mainboard. |
| 29 | **********************************************/ |
| 30 | static void mainboard_enable(device_t dev) |
| 31 | { |
| 32 | printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); |
Kyösti Mälkki | 6a089e3 | 2014-06-27 13:32:59 +0300 | [diff] [blame] | 33 | |
| 34 | if (acpi_is_wakeup_s3()) |
WANG Siyuan | f77f734 | 2013-08-13 17:09:51 +0800 | [diff] [blame] | 35 | agesawrapper_fchs3earlyrestore(); |
WANG Siyuan | f77f734 | 2013-08-13 17:09:51 +0800 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | struct chip_operations mainboard_ops = { |
| 39 | .enable_dev = mainboard_enable, |
| 40 | }; |