summaryrefslogtreecommitdiff
path: root/lib/vbexport
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-08-02 23:00:03 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:22 -0700
commit792f7f6ae53a75ad559e0c5c7092b3078467ef98 (patch)
treeaa4f53c6baa1cadd8994008f63450d036deb85b3 /lib/vbexport
parentf2dd80ae0a4e4f3b9b22e03a3ca1de91c95114aa (diff)
Remove the device tree from one of the vboot support APIs.
This change removes the device tree from one of the vboot support APIs so that they fit better with coreboot u-boot. Specifically this is cros_gpio_fetch which is for getting GPIO values. Coreboot will read these and provide the values through its coreboot tables. The device tree pointer is global data so it doesn't need to be passed around as a parameter to be accessible. This change also removes the device tree from other interfaces in cmd_vboot_twostop.c so the structure of the code is more consistent. This way people can expect the device tree to always be the one pointed at by the global data and not sometimes one and sometimes the other, even though as written those will be equivalent. This change also takes the opportunity to mark the local functions in that file static, which is most of them. BUG=chrome-os-partner:4552 TEST=Built for x86-alex and tegra2_kaen. Installed and booted to chromeos login on Kaen. Change-Id: I084e774d97025d9ec71abe09c92fab8a7827892f Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/5232 Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'lib/vbexport')
-rw-r--r--lib/vbexport/misc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/vbexport/misc.c b/lib/vbexport/misc.c
index cab7a4c449d..9a608aba4b4 100644
--- a/lib/vbexport/misc.c
+++ b/lib/vbexport/misc.c
@@ -15,15 +15,12 @@
#define PREFIX "misc: "
-DECLARE_GLOBAL_DATA_PTR;
-
uint32_t VbExIsShutdownRequested(void)
{
- void *fdt_ptr = (void *)gd->blob;
cros_gpio_t lidsw, pwrsw;
- if (cros_gpio_fetch(CROS_GPIO_LIDSW, fdt_ptr, &lidsw) ||
- cros_gpio_fetch(CROS_GPIO_PWRSW, fdt_ptr, &pwrsw)) {
+ if (cros_gpio_fetch(CROS_GPIO_LIDSW, &lidsw) ||
+ cros_gpio_fetch(CROS_GPIO_PWRSW, &pwrsw)) {
VBDEBUG(PREFIX "Failed to fetch GPIO!\n");
/* still return 0, No-Shutdown-Requested */
return 0;