2015-06-09 22:42:55 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007-2009 coresystems GmbH
|
2015-06-10 05:18:38 +02:00
|
|
|
* Copyright (C) 2014 Google Inc.
|
2015-06-09 22:42:55 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <drivers/intel/gma/int15.h>
|
2016-07-26 04:31:41 +02:00
|
|
|
#include <vendorcode/google/chromeos/chromeos.h>
|
2015-06-09 22:42:55 +02:00
|
|
|
#include "ec.h"
|
2016-12-18 18:59:58 +01:00
|
|
|
#include "variant.h"
|
2015-06-09 22:42:55 +02:00
|
|
|
|
|
|
|
|
2018-05-04 20:23:33 +02:00
|
|
|
static void mainboard_init(struct device *dev)
|
2015-06-09 22:42:55 +02:00
|
|
|
{
|
|
|
|
mainboard_ec_init();
|
|
|
|
}
|
|
|
|
|
2018-05-04 20:23:33 +02:00
|
|
|
static int mainboard_smbios_data(struct device *dev, int *handle,
|
2015-06-09 22:42:55 +02:00
|
|
|
unsigned long *current)
|
|
|
|
{
|
2016-12-18 18:59:58 +01:00
|
|
|
return variant_smbios_data(dev, handle, current);
|
2015-06-09 22:42:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// mainboard_enable is executed as first thing after
|
|
|
|
// enumerate_buses().
|
|
|
|
|
2018-05-04 20:23:33 +02:00
|
|
|
static void mainboard_enable(struct device *dev)
|
2015-06-09 22:42:55 +02:00
|
|
|
{
|
|
|
|
dev->ops->init = mainboard_init;
|
|
|
|
dev->ops->get_smbios_data = mainboard_smbios_data;
|
2016-07-26 04:31:41 +02:00
|
|
|
dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
|
2015-06-09 22:42:55 +02:00
|
|
|
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct chip_operations mainboard_ops = {
|
|
|
|
.enable_dev = mainboard_enable,
|
|
|
|
};
|