Files
system76-coreboot/src/vendorcode/google/chromeos/acpi.c
Duncan Laurie 0907aa0fe6 Revert "vendorcode/google/chromeos: Get ACPI pin from GPIO library"
This reverts commit 6217e9beff.

Reason for revert: boards with CROS_GPIO_VIRTUAL selected in
absence of dedicated recovery GPIO pin is die-ing now at
gpio.c file line. 127

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Ief20681b2a7ed4d15fd2d637ae034d54a96b2d6f
Reviewed-on: https://review.coreboot.org/c/30278
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-17 19:18:22 +00:00

44 lines
1.1 KiB
C

/*
* This file is part of the coreboot project.
*
* Copyright 2016 Google Inc.
*
* 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 <arch/acpigen.h>
#include "chromeos.h"
void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num)
{
size_t i;
acpigen_write_scope("\\");
acpigen_write_name("OIPG");
acpigen_write_package(num);
for (i = 0; i < num; i++) {
acpigen_write_package(4);
acpigen_write_integer(gpios[i].type);
acpigen_write_integer(gpios[i].polarity);
acpigen_write_integer(gpios[i].gpio_num);
acpigen_write_string(gpios[i].device);
acpigen_pop_len();
}
acpigen_pop_len();
acpigen_pop_len();
}
void chromeos_dsdt_generator(struct device *dev)
{
mainboard_chromeos_acpi_generate();
}