2 * This file is part of the coreboot project.
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2011 Google Inc.
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.
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.
19 #include <device/device.h>
20 #include <device/pci_def.h>
21 #include <device/pci_ops.h>
22 #include <console/console.h>
23 #include <drivers/intel/gma/int15.h>
24 #include <pc80/mc146818rtc.h>
25 #include <arch/acpi.h>
27 #include <arch/interrupt.h>
28 #include <boot/coreboot_tables.h>
31 #include <southbridge/intel/bd82x6x/pch.h>
33 #include <device/pci.h>
34 #include <ec/quanta/it8518/ec.h>
36 void mainboard_suspend_resume(void)
38 /* Stout EC needs to be put back in ACPI mode */
39 ec_write_cmd(EC_CMD_NOTIFY_ACPI_ENTER
);
44 static void mainboard_init(device_t dev
)
46 struct device
*ethernet_dev
= NULL
;
48 /* Initialize the Embedded Controller */
52 * Battery life time - LAN PCIe should enter ASPM L1 to save
53 * power when LAN connection is idle.
54 * enable CLKREQ: LAN pci config space 0x81h=01
56 ethernet_dev
= dev_find_device(STOUT_NIC_VENDOR_ID
,
57 STOUT_NIC_DEVICE_ID
, dev
);
59 if (ethernet_dev
!= NULL
)
60 pci_write_config8(ethernet_dev
, 0x81, 0x01);
63 // mainboard_enable is executed as first thing after
66 static void mainboard_enable(device_t dev
)
68 dev
->ops
->init
= mainboard_init
;
69 install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS
, GMA_INT15_PANEL_FIT_DEFAULT
, GMA_INT15_BOOT_DISPLAY_DEFAULT
, 0);
72 struct chip_operations mainboard_ops
= {
73 .enable_dev
= mainboard_enable
,