Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2013 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 Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <types.h> |
| 18 | #include <string.h> |
| 19 | #include <smbios.h> |
| 20 | #include <device/device.h> |
| 21 | #include <device/device.h> |
| 22 | #include <device/pci_def.h> |
| 23 | #include <device/pci_ops.h> |
| 24 | #include <console/console.h> |
Vladimir Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 25 | #include <drivers/intel/gma/int15.h> |
Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 26 | #include <pc80/mc146818rtc.h> |
| 27 | #include <arch/acpi.h> |
| 28 | #include <arch/io.h> |
| 29 | #include <arch/interrupt.h> |
| 30 | #include <boot/coreboot_tables.h> |
Duncan Laurie | 4327624 | 2014-11-11 08:31:26 -0800 | [diff] [blame] | 31 | #include "board_version.h" |
Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 32 | #include "ec.h" |
Duncan Laurie | 25c6f75 | 2014-05-22 08:25:36 -0700 | [diff] [blame] | 33 | |
| 34 | void mainboard_suspend_resume(void) |
| 35 | { |
| 36 | } |
Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 37 | |
Duncan Laurie | 8283344 | 2014-10-13 13:12:38 -0700 | [diff] [blame] | 38 | const char *smbios_mainboard_version(void) |
| 39 | { |
Duncan Laurie | 4327624 | 2014-11-11 08:31:26 -0800 | [diff] [blame] | 40 | return samus_board_version(); |
Duncan Laurie | 8283344 | 2014-10-13 13:12:38 -0700 | [diff] [blame] | 41 | } |
| 42 | |
Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 43 | static void mainboard_init(device_t dev) |
| 44 | { |
| 45 | mainboard_ec_init(); |
| 46 | } |
| 47 | |
Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 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); |
Duncan Laurie | ddc3e42 | 2013-10-02 16:10:54 -0700 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | struct chip_operations mainboard_ops = { |
| 58 | .enable_dev = mainboard_enable, |
| 59 | }; |