aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-01-28 16:25:27 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-02-15 08:19:14 +0000
commitaacbd66a8537fe4ec45109324caa89145e70c1bd (patch)
tree80709aa6a056683fc742b859a3bd9fa13a8226ad /src/southbridge
parentf76822a75cc02064a8e8fb82602aeca76b140c7c (diff)
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 <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50065 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/intel/lynxpoint/early_pch.c1
-rw-r--r--src/southbridge/intel/lynxpoint/lp_gpio.h14
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 <southbridge/intel/common/gpio.h>
#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