blob: a1b5a0938d3100de0c2d1f6e9e289d85e7c2db4f [file] [log] [blame]
Patrick Rudolph6308e0e2018-03-27 16:06:34 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Vladimir Serbinenko
5 * Copyright (C) 2018 Patrick Rudolph <siro@das-labor.org>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; version 2 of
10 * 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.
16 */
17#include <device/device.h>
18#include <drivers/intel/gma/int15.h>
19#include <southbridge/intel/bd82x6x/pch.h>
Patrick Rudolphfe98e902018-03-27 16:17:12 +020020#include <smbios.h>
21
22#if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLES)
23static int mainboard_smbios_data(struct device *dev, int *handle,
24 unsigned long *current)
25{
26 int len = 0;
27
28 // add IPMI Device Information
29 len += smbios_write_type38(
30 current, handle,
31 SMBIOS_BMC_INTERFACE_KCS,
32 0x20, // IPMI Version
33 0x20, // I2C address
34 0xff, // no NV storage
35 0, // IO port interface address
36 0,
37 0); // no IRQ
38
39 return len;
40}
41#endif
Patrick Rudolph6308e0e2018-03-27 16:06:34 +020042
43static void mainboard_enable(struct device *dev)
44{
45 install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_NONE,
46 GMA_INT15_PANEL_FIT_DEFAULT,
47 GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
Patrick Rudolphfe98e902018-03-27 16:17:12 +020048#if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLES)
49 dev->ops->get_smbios_data = mainboard_smbios_data;
50#endif
Patrick Rudolph6308e0e2018-03-27 16:06:34 +020051}
52
53struct chip_operations mainboard_ops = {
54 .enable_dev = mainboard_enable,
55};