Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 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 |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #include <console/console.h> |
| 21 | #include <device/device.h> |
| 22 | #include <device/pci.h> |
| 23 | #include <arch/io.h> |
| 24 | #include <boot/tables.h> |
| 25 | #include <cpu/x86/msr.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 26 | #include <device/pci_def.h> |
zbao | f543c7b | 2012-04-13 13:42:46 +0800 | [diff] [blame] | 27 | #include <southbridge/amd/sb800/sb800.h> |
| 28 | #include <arch/acpi.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 29 | #include "chip.h" |
zbao | f543c7b | 2012-04-13 13:42:46 +0800 | [diff] [blame] | 30 | #include "BiosCallOuts.h" |
| 31 | #include <cpu/amd/agesa/s3_resume.h> |
| 32 | #include <cpu/amd/mtrr.h> |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 33 | |
efdesign98 | d7a696d | 2011-09-15 15:24:26 -0600 | [diff] [blame] | 34 | void set_pcie_reset(void); |
| 35 | void set_pcie_dereset(void); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * TODO |
| 39 | * SB CIMx callback |
| 40 | */ |
| 41 | void set_pcie_reset(void) |
| 42 | { |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * TODO |
| 47 | * mainboard specific SB CIMx callback |
| 48 | */ |
| 49 | void set_pcie_dereset(void) |
| 50 | { |
| 51 | } |
| 52 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 53 | |
| 54 | /************************************************* |
| 55 | * enable the dedicated function in persimmon board. |
| 56 | *************************************************/ |
| 57 | static void persimmon_enable(device_t dev) |
| 58 | { |
Scott Duplichan | 8c46263 | 2011-05-15 22:10:15 +0000 | [diff] [blame] | 59 | printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); |
| 60 | |
zbao | f543c7b | 2012-04-13 13:42:46 +0800 | [diff] [blame] | 61 | /* |
| 62 | * The mainboard is the first place that we get control in ramstage. Check |
| 63 | * for S3 resume and call the approriate AGESA/CIMx resume functions. |
| 64 | */ |
Patrick Georgi | e166782 | 2012-05-05 15:29:32 +0200 | [diff] [blame] | 65 | #if CONFIG_HAVE_ACPI_RESUME |
zbao | f543c7b | 2012-04-13 13:42:46 +0800 | [diff] [blame] | 66 | acpi_slp_type = acpi_get_sleep_type(); |
| 67 | #endif |
| 68 | |
Kyösti Mälkki | 55fff930 | 2012-07-11 08:02:39 +0300 | [diff] [blame] | 69 | setup_uma_memory(); |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 70 | |
| 71 | } |
| 72 | |
| 73 | int add_mainboard_resources(struct lb_memory *mem) |
| 74 | { |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 75 | return 0; |
| 76 | } |
zbao | f543c7b | 2012-04-13 13:42:46 +0800 | [diff] [blame] | 77 | |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 78 | struct chip_operations mainboard_ops = { |
Scott Duplichan | 8c46263 | 2011-05-15 22:10:15 +0000 | [diff] [blame] | 79 | CHIP_NAME(CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_NUMBER " Mainboard") |
Frank Vibrans | 69da1b6 | 2011-02-14 19:04:45 +0000 | [diff] [blame] | 80 | .enable_dev = persimmon_enable, |
| 81 | }; |