Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2012 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. |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 17 | #include <smbios.h> |
Matt DeVillier | ae141dd | 2014-07-13 18:51:28 -0500 | [diff] [blame] | 18 | #include <string.h> |
| 19 | #include <types.h> |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 20 | #include <arch/acpi.h> |
| 21 | #include <arch/io.h> |
| 22 | #include <arch/interrupt.h> |
| 23 | #include <boot/coreboot_tables.h> |
Matt DeVillier | ae141dd | 2014-07-13 18:51:28 -0500 | [diff] [blame] | 24 | #include <console/console.h> |
| 25 | #include <device/device.h> |
| 26 | #include <device/device.h> |
| 27 | #include <device/pci_def.h> |
| 28 | #include <device/pci_ops.h> |
| 29 | #include <pc80/mc146818rtc.h> |
| 30 | #include <southbridge/intel/lynxpoint/pch.h> |
Vladimir Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 31 | #include <drivers/intel/gma/int15.h> |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 32 | #include "onboard.h" |
Matt DeVillier | ae141dd | 2014-07-13 18:51:28 -0500 | [diff] [blame] | 33 | |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 34 | |
| 35 | void mainboard_suspend_resume(void) |
| 36 | { |
| 37 | /* Call SMM finalize() handlers before resume */ |
| 38 | outb(0xcb, 0xb2); |
| 39 | } |
| 40 | |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 41 | |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 42 | |
| 43 | static void mainboard_init(device_t dev) |
| 44 | { |
| 45 | lan_init(); |
| 46 | } |
| 47 | |
| 48 | // mainboard_enable is executed as first thing after |
| 49 | // enumerate_buses(). |
| 50 | |
| 51 | static void mainboard_enable(device_t dev) |
| 52 | { |
| 53 | dev->ops->init = mainboard_init; |
Vladimir Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 54 | install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); |
Mohammed Habibulla | 05497d0 | 2013-10-24 16:44:06 -0700 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | struct chip_operations mainboard_ops = { |
| 58 | .enable_dev = mainboard_enable, |
| 59 | }; |