Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2011-2012 Google Inc. |
| 6 | * Copyright (C) 2014 Vladimir Serbinenko |
| 7 | * |
| 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. |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 16 | */ |
| 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 Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 24 | #include <drivers/intel/gma/int15.h> |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 25 | #include <pc80/mc146818rtc.h> |
| 26 | #include <arch/acpi.h> |
| 27 | #include <arch/io.h> |
| 28 | #include <arch/interrupt.h> |
| 29 | #include <boot/coreboot_tables.h> |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 30 | #include <southbridge/intel/bd82x6x/pch.h> |
| 31 | #include <smbios.h> |
| 32 | #include <device/pci.h> |
| 33 | #include <cbfs.h> |
| 34 | #include <pc80/keyboard.h> |
Elyes HAOUAS | 68a9716 | 2014-07-31 10:39:57 +0200 | [diff] [blame] | 35 | #include <ec/lenovo/h8/h8.h> |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 36 | |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 37 | static void mainboard_init(device_t dev) |
| 38 | { |
| 39 | RCBA32(0x38c8) = 0x00002005; |
| 40 | RCBA32(0x38c4) = 0x00802005; |
| 41 | RCBA32(0x38c0) = 0x00000007; |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | /* mainboard_enable is executed as first thing after |
| 45 | enumerate_buses(). */ |
| 46 | static void mainboard_enable(device_t dev) |
| 47 | { |
| 48 | dev->ops->init = mainboard_init; |
Vladimir Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 49 | install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 50 | } |
| 51 | |
Zaolin | a823f9b | 2014-05-06 21:31:45 +0200 | [diff] [blame] | 52 | void h8_mainboard_init_dock (void) |
| 53 | { |
| 54 | return; |
| 55 | } |
| 56 | |
| 57 | struct chip_operations mainboard_ops = { |
| 58 | .enable_dev = mainboard_enable, |
| 59 | }; |