blob: 157fd3ab5cc19caac60c493342d755d89d01f012 [file] [log] [blame]
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2011-2012 Google Inc.
Vladimir Serbinenkob2939f72014-01-22 17:12:35 +01006 * Copyright (C) 2014 Vladimir Serbinenko
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +01007 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010016 */
17
18#include <types.h>
19#include <string.h>
20#include <device/device.h>
21#include <device/pci_def.h>
22#include <device/pci_ops.h>
23#include <console/console.h>
Vladimir Serbinenkoa2a906e2014-09-01 01:41:37 +020024#include <drivers/intel/gma/int15.h>
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010025#include <arch/acpi.h>
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010026#include <boot/coreboot_tables.h>
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010027#include <southbridge/intel/bd82x6x/pch.h>
28#include <smbios.h>
29#include <device/pci.h>
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010030#include <pc80/keyboard.h>
Vladimir Serbinenko91175bb2014-01-23 09:06:50 +010031#include <ec/lenovo/h8/h8.h>
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010032
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010033static void mainboard_init(device_t dev)
34{
35 RCBA32(0x38c8) = 0x00002005;
36 RCBA32(0x38c4) = 0x00802005;
37 RCBA32(0x38c0) = 0x00000007;
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010038}
39
40// mainboard_enable is executed as first thing after
41// enumerate_buses().
42
43static void mainboard_enable(device_t dev)
44{
45 dev->ops->init = mainboard_init;
Vladimir Serbinenko91175bb2014-01-23 09:06:50 +010046
Vladimir Serbinenkoa2a906e2014-09-01 01:41:37 +020047 install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010048}
49
Vladimir Serbinenkoe7e95022014-01-12 15:26:15 +010050void h8_mainboard_init_dock (void)
51{
52}
53
54struct chip_operations mainboard_ops = {
55 .enable_dev = mainboard_enable,
56};