aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/storm
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/storm')
-rw-r--r--src/mainboard/google/storm/boardid.c9
-rw-r--r--src/mainboard/google/storm/cdp.c2
-rw-r--r--src/mainboard/google/storm/mainboard.c13
3 files changed, 11 insertions, 13 deletions
diff --git a/src/mainboard/google/storm/boardid.c b/src/mainboard/google/storm/boardid.c
index a8dd84439b..878598bf92 100644
--- a/src/mainboard/google/storm/boardid.c
+++ b/src/mainboard/google/storm/boardid.c
@@ -18,15 +18,15 @@
*/
#include <boardid.h>
-#include <gpiolib.h>
+#include <gpio.h>
#include <console/console.h>
#include <stdlib.h>
/*
* Storm boards dedicate to the board ID three GPIOs in tertiary mode: 29, 30
* and 68. On proto0 GPIO68 is used and tied low, so it reads as 'zero' by
- * gpio_get_in_tristate_values(), whereas the other two pins are not connected
- * and read as 'two'. This results in gpio_get_in_tristate_values() returning
+ * gpio_get_tristates(), whereas the other two pins are not connected
+ * and read as 'two'. This results in gpio_get_tristates() returning
* 8 on proto0.
*
* Three tertitiary signals could represent 27 different values. To make
@@ -45,8 +45,7 @@ static uint8_t get_board_id(void)
gpio_t hw_rev_gpios[] = {29, 30, 68};
int offset = 19;
- bid = gpio_get_in_tristate_values(hw_rev_gpios,
- ARRAY_SIZE(hw_rev_gpios), 1);
+ bid = gpio_get_tristates(hw_rev_gpios, ARRAY_SIZE(hw_rev_gpios), 1);
bid = (bid + offset) % 27;
printk(BIOS_INFO, "Board ID %d\n", bid);
diff --git a/src/mainboard/google/storm/cdp.c b/src/mainboard/google/storm/cdp.c
index 7e1aeb66ad..78edb26048 100644
--- a/src/mainboard/google/storm/cdp.c
+++ b/src/mainboard/google/storm/cdp.c
@@ -1,7 +1,7 @@
/* * Copyright (c) 2012 - 2013 The Linux Foundation. All rights reserved.* */
-#include <soc/gpio.h>
+#include <gpio.h>
#include <soc/cdp.h>
#include <types.h>
diff --git a/src/mainboard/google/storm/mainboard.c b/src/mainboard/google/storm/mainboard.c
index 552f968609..59e7ce7764 100644
--- a/src/mainboard/google/storm/mainboard.c
+++ b/src/mainboard/google/storm/mainboard.c
@@ -23,9 +23,8 @@
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
-#include <gpiolib.h>
+#include <gpio.h>
#include <soc/clock.h>
-#include <soc/gpio.h>
#include <soc/usb.h>
#include <string.h>
#include <symbols.h>
@@ -46,7 +45,7 @@ static void setup_usb(void)
#if !CONFIG_BOARD_VARIANT_AP148
gpio_tlmm_config_set(USB_ENABLE_GPIO, FUNC_SEL_GPIO,
GPIO_PULL_UP, GPIO_10MA, GPIO_ENABLE);
- gpio_set_out_value(USB_ENABLE_GPIO, 1);
+ gpio_set(USB_ENABLE_GPIO, 1);
#endif
usb_clock_config();
@@ -86,9 +85,9 @@ static void setup_tpm(void)
* make it twice as long. If the output was driven low originally, the
* reset pulse will be even longer.
*/
- gpio_set_out_value(TPM_RESET_GPIO, 0);
+ gpio_set(TPM_RESET_GPIO, 0);
udelay(160);
- gpio_set_out_value(TPM_RESET_GPIO, 1);
+ gpio_set(TPM_RESET_GPIO, 1);
}
#define SW_RESET_GPIO 26
@@ -106,7 +105,7 @@ static void deassert_sw_reset(void)
gpio_tlmm_config_set(SW_RESET_GPIO, FUNC_SEL_GPIO,
GPIO_PULL_UP, GPIO_4MA, GPIO_ENABLE);
- gpio_set_out_value(SW_RESET_GPIO, 0);
+ gpio_set(SW_RESET_GPIO, 0);
}
static void mainboard_init(device_t dev)
@@ -148,7 +147,7 @@ static int read_gpio(gpio_t gpio_num)
gpio_tlmm_config_set(gpio_num, GPIO_FUNC_DISABLE,
GPIO_NO_PULL, GPIO_2MA, GPIO_DISABLE);
udelay(10); /* Should be enough to settle. */
- return gpio_get_in_value(gpio_num);
+ return gpio_get(gpio_num);
}
void fill_lb_gpios(struct lb_gpios *gpios)