summaryrefslogtreecommitdiff
path: root/src/mainboard/google/reef/chromeos.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-09-02 17:50:22 -0500
committerAaron Durbin <adurbin@chromium.org>2016-09-06 20:16:13 +0200
commit475d2cb19e5e822c10239167864faf647a5d93c5 (patch)
tree01883951ae210ea011ad7f02465012c1ddd6fc58 /src/mainboard/google/reef/chromeos.c
parentd1e365ac3824bee03feab9a93d15abc224d3bc57 (diff)
downloadcoreboot-475d2cb19e5e822c10239167864faf647a5d93c5.tar.xz
mainboard/google/reef: provide cros_gpio variant API
Add support for Chrome OS gpio ACPI table information by providing weak implementation from the baseboard. BUG=chrome-os-partner:56677 Change-Id: I517764b78f47fb7b3637482ff9efc053cdd1ac69 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/16422 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/mainboard/google/reef/chromeos.c')
-rw-r--r--src/mainboard/google/reef/chromeos.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/google/reef/chromeos.c b/src/mainboard/google/reef/chromeos.c
index 7d7af9e11b..58c2cd8e27 100644
--- a/src/mainboard/google/reef/chromeos.c
+++ b/src/mainboard/google/reef/chromeos.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <baseboard/variants.h>
#include <boot/coreboot_tables.h>
#include <ec/google/chromeec/ec.h>
#include <gpio.h>
@@ -67,12 +68,11 @@ int get_write_protect_state(void)
return gpio_get(GPIO_PCH_WP);
}
-static const struct cros_gpio cros_gpios[] = {
- CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, GPIO_COMM_NW_NAME),
- CROS_GPIO_WP_AH(PAD_NW(GPIO_PCH_WP), GPIO_COMM_NW_NAME),
-};
-
void mainboard_chromeos_acpi_generate(void)
{
- chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
+ const struct cros_gpio *gpios;
+ size_t num;
+
+ gpios = variant_cros_gpios(&num);
+ chromeos_acpi_gpio_generate(gpios, num);
}