Duncan Laurie | 558602f | 2018-10-31 10:38:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2018 Google LLC |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #include <arch/acpi.h> |
Furquan Shaikh | a08765d | 2019-02-05 14:03:44 -0800 | [diff] [blame^] | 17 | #include <soc/gpio.h> |
Duncan Laurie | 558602f | 2018-10-31 10:38:16 -0700 | [diff] [blame] | 18 | #include <soc/ramstage.h> |
| 19 | #include <variant/gpio.h> |
| 20 | #include <vendorcode/google/chromeos/chromeos.h> |
| 21 | |
| 22 | void mainboard_silicon_init_params(FSP_S_CONFIG *params) |
| 23 | { |
| 24 | const struct pad_config *gpio_table; |
| 25 | size_t num_gpios; |
| 26 | |
| 27 | gpio_table = variant_gpio_table(&num_gpios); |
Furquan Shaikh | a08765d | 2019-02-05 14:03:44 -0800 | [diff] [blame^] | 28 | cnl_configure_pads(gpio_table, num_gpios); |
Duncan Laurie | 1a1f00c | 2018-12-08 12:00:17 -0800 | [diff] [blame] | 29 | } |
| 30 | |
Duncan Laurie | 558602f | 2018-10-31 10:38:16 -0700 | [diff] [blame] | 31 | static void mainboard_enable(struct device *dev) |
| 32 | { |
Duncan Laurie | 558602f | 2018-10-31 10:38:16 -0700 | [diff] [blame] | 33 | dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator; |
| 34 | } |
| 35 | |
| 36 | struct chip_operations mainboard_ops = { |
| 37 | .enable_dev = mainboard_enable, |
| 38 | }; |