summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Makefile.inc2
-rw-r--r--src/lib/gpio.c (renamed from src/lib/tristate_gpios.c)10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 079c855f68..0959359695 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -92,7 +92,7 @@ ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += edid.c
ramstage-y += memrange.c
ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c
ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c
-ramstage-$(CONFIG_TERTIARY_BOARD_ID) += tristate_gpios.c
+ramstage-$(CONFIG_TERTIARY_BOARD_ID) += gpio.c
ramstage-$(CONFIG_GENERIC_UDELAY) += timer.c
romstage-y += cbmem_common.c dynamic_cbmem.c
diff --git a/src/lib/tristate_gpios.c b/src/lib/gpio.c
index 0967a8f4be..3a646e0d1d 100644
--- a/src/lib/tristate_gpios.c
+++ b/src/lib/gpio.c
@@ -22,7 +22,7 @@
#include <delay.h>
#include <gpio.h>
-int gpio_get_tristates(gpio_t gpio[], int num_gpio)
+int gpio_base3_value(gpio_t gpio[], int num_gpio)
{
/*
* GPIOs which are tied to stronger external pull up or pull down
@@ -36,7 +36,7 @@ int gpio_get_tristates(gpio_t gpio[], int num_gpio)
static const char tristate_char[] = {[0] = '0', [1] = '1', [Z] = 'Z'};
int temp;
int index;
- int id = 0;
+ int result = 0;
char value[num_gpio];
/* Enable internal pull up */
@@ -70,13 +70,13 @@ int gpio_get_tristates(gpio_t gpio[], int num_gpio)
temp = gpio_get(gpio[index]);
temp |= ((value[index] ^ temp) << 1);
printk(BIOS_DEBUG, "%c ", tristate_char[temp]);
- id = (id * 3) + temp;
+ result = (result * 3) + temp;
}
- printk(BIOS_DEBUG, "= %d\n", id);
+ printk(BIOS_DEBUG, "= %d\n", result);
/* Disable pull up / pull down to conserve power */
for (index = 0; index < num_gpio; ++index)
gpio_input(gpio[index]);
- return id;
+ return result;
}