Naresh G Solanki | ab5d690 | 2016-10-15 18:13:55 +0530 | [diff] [blame] | 1 | /* |
| 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 Sarkar | a5b1041 | 2016-11-28 14:53:12 +0530 | [diff] [blame^] | 27 | #include <variant/gpio.h> |
Naresh G Solanki | ab5d690 | 2016-10-15 18:13:55 +0530 | [diff] [blame] | 28 | |
Naresh G Solanki | ab5d690 | 2016-10-15 18:13:55 +0530 | [diff] [blame] | 29 | static void mainboard_init(device_t dev) |
| 30 | { |
| 31 | if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) |
| 32 | mainboard_ec_init(); |
| 33 | } |
| 34 | |
Naresh G Solanki | ab5d690 | 2016-10-15 18:13:55 +0530 | [diff] [blame] | 35 | /* |
| 36 | * mainboard_enable is executed as first thing after |
| 37 | * enumerate_buses(). |
| 38 | */ |
| 39 | static void mainboard_enable(device_t dev) |
| 40 | { |
| 41 | dev->ops->init = mainboard_init; |
Naresh G Solanki | ab5d690 | 2016-10-15 18:13:55 +0530 | [diff] [blame] | 42 | dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator; |
| 43 | } |
| 44 | |
| 45 | struct chip_operations mainboard_ops = { |
| 46 | .enable_dev = mainboard_enable, |
| 47 | }; |