From aacbd66a8537fe4ec45109324caa89145e70c1bd Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 28 Jan 2021 16:25:27 +0100 Subject: sb/intel/lynxpoint: Clean up lp_gpio.h Move `mainboard_gpio_map` declaration inside header and reorder some function declarations. This is to align the header with Broadwell. Change-Id: I436d7fdabf8d574e5dd2787fb6097f384cc8e453 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/50065 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- src/southbridge/intel/lynxpoint/early_pch.c | 1 - src/southbridge/intel/lynxpoint/lp_gpio.h | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/southbridge/intel/lynxpoint/early_pch.c b/src/southbridge/intel/lynxpoint/early_pch.c index ace8b54552..75aaf67737 100644 --- a/src/southbridge/intel/lynxpoint/early_pch.c +++ b/src/southbridge/intel/lynxpoint/early_pch.c @@ -13,7 +13,6 @@ #if CONFIG(INTEL_LYNXPOINT_LP) #include "lp_gpio.h" -extern const struct pch_lp_gpio_map mainboard_gpio_map[]; #else #include #endif diff --git a/src/southbridge/intel/lynxpoint/lp_gpio.h b/src/southbridge/intel/lynxpoint/lp_gpio.h index d0bfab63bf..4efd9da00c 100644 --- a/src/southbridge/intel/lynxpoint/lp_gpio.h +++ b/src/southbridge/intel/lynxpoint/lp_gpio.h @@ -152,15 +152,21 @@ struct pch_lp_gpio_map { /* Configure GPIOs with mainboard provided settings */ void setup_pch_lp_gpios(const struct pch_lp_gpio_map map[]); -/* get GPIO pin value */ +/* Get GPIO pin value */ int get_gpio(int gpio_num); + +/* Set GPIO pin value */ +void set_gpio(int gpio_num, int value); + +/* Return non-zero if gpio is set to native function. 0 otherwise. */ +int gpio_is_native(int gpio_num); + /* - * get a number comprised of multiple GPIO values. gpio_num_array points to + * Get a number comprised of multiple GPIO values. gpio_num_array points to * the array of gpio pin numbers to scan, terminated by -1. */ unsigned int get_gpios(const int *gpio_num_array); -void set_gpio(int gpio_num, int value); +extern const struct pch_lp_gpio_map mainboard_gpio_map[]; -int gpio_is_native(int gpio_num); #endif -- cgit v1.2.3