Eric Lai | 5088682 | 2020-11-26 12:10:39 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
Eric Lai | b052c4b | 2020-11-27 13:50:02 +0800 | [diff] [blame^] | 3 | #include <acpi/acpi.h> |
Eric Lai | 5e053af | 2020-11-26 12:58:10 +0800 | [diff] [blame] | 4 | #include <baseboard/variants.h> |
Eric Lai | 5088682 | 2020-11-26 12:10:39 +0800 | [diff] [blame] | 5 | #include <device/device.h> |
Eric Lai | b052c4b | 2020-11-27 13:50:02 +0800 | [diff] [blame^] | 6 | #include <vendorcode/google/chromeos/chromeos.h> |
Eric Lai | 5088682 | 2020-11-26 12:10:39 +0800 | [diff] [blame] | 7 | |
| 8 | static void mainboard_init(void *chip_info) |
| 9 | { |
Eric Lai | 5e053af | 2020-11-26 12:58:10 +0800 | [diff] [blame] | 10 | const struct pad_config *pads; |
| 11 | size_t num; |
| 12 | pads = variant_gpio_table(&num); |
| 13 | gpio_configure_pads(pads, num); |
Eric Lai | 5088682 | 2020-11-26 12:10:39 +0800 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | static void mainboard_enable(struct device *dev) |
| 17 | { |
Eric Lai | b052c4b | 2020-11-27 13:50:02 +0800 | [diff] [blame^] | 18 | dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; |
Eric Lai | 5088682 | 2020-11-26 12:10:39 +0800 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | struct chip_operations mainboard_ops = { |
| 22 | .init = mainboard_init, |
| 23 | .enable_dev = mainboard_enable, |
| 24 | }; |