blob: 652af732de2e45f53489428e2175d3f258c20f9e [file] [log] [blame]
Naresh G Solankiab5d6902016-10-15 18:13:55 +05301/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2013 Google Inc.
6 * Copyright (C) 2016 Intel Corporation.
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.
16 */
17
18#include <arch/acpi.h>
19#include <console/console.h>
20#include <device/device.h>
21#include <gpio.h>
22#include <stdlib.h>
23#include <string.h>
24#include <soc/nhlt.h>
25#include <vendorcode/google/chromeos/chromeos.h>
26#include "ec.h"
Barnali Sarkara5b10412016-11-28 14:53:12 +053027#include <variant/gpio.h>
Naresh G Solankiab5d6902016-10-15 18:13:55 +053028
Naresh G Solankiab5d6902016-10-15 18:13:55 +053029static void mainboard_init(device_t dev)
30{
31 if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
32 mainboard_ec_init();
33}
34
Naresh G Solankiab5d6902016-10-15 18:13:55 +053035/*
36 * mainboard_enable is executed as first thing after
37 * enumerate_buses().
38 */
39static void mainboard_enable(device_t dev)
40{
41 dev->ops->init = mainboard_init;
Naresh G Solankiab5d6902016-10-15 18:13:55 +053042 dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
43}
44
45struct chip_operations mainboard_ops = {
46 .enable_dev = mainboard_enable,
47};