summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-09-06 17:11:33 +0000
committerVadim Bendebury <vbendeb@chromium.org>2016-09-06 17:15:17 +0000
commit03a3f864796d02196de8419b3c12c78f425b946c (patch)
tree9b698ddea3eac05f3e2c2b622de7fb5b857fc64b
parentd5639272e2ed6b4478a39310c5aad6a4545509ad (diff)
downloadchrome-ec-03a3f864796d02196de8419b3c12c78f425b946c.tar.gz
Revert "cr50: remove internal pull up on DIOM0"
This reverts commit 5e6da91fe86301d276b452a660139c27c3786a82. Change-Id: I65b37c087a86fab06f6e23e895ceee2ae2def5ee Reviewed-on: https://chromium-review.googlesource.com/381160 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--board/cr50/board.c5
-rw-r--r--board/cr50/gpio.inc5
-rw-r--r--chip/g/rbox.c5
-rw-r--r--chip/g/rbox.h14
4 files changed, 6 insertions, 23 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index a45abcfae1..83d8957e5b 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -16,8 +16,6 @@
#include "init_chip.h"
#include "registers.h"
#include "nvmem.h"
-#include "rbox.h"
-#include "spi.h"
#include "system.h"
#include "task.h"
#include "trng.h"
@@ -25,6 +23,7 @@
#include "usb_descriptor.h"
#include "usb_hid.h"
#include "util.h"
+#include "spi.h"
#include "usb_spi.h"
/* Define interrupt and gpio structs */
@@ -288,7 +287,7 @@ void sys_rst_asserted(enum gpio_signal signal)
* asserting this signal should not cause a system reset.
*/
CPRINTS("%s resceived signal %d)", __func__, signal);
- if (usb_spi_update_in_progress() || rbox_is_asserting_ec_reset())
+ if (usb_spi_update_in_progress())
return;
cflush();
diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc
index 454fe729bc..e68124d561 100644
--- a/board/cr50/gpio.inc
+++ b/board/cr50/gpio.inc
@@ -11,8 +11,11 @@
* We can assert SYS_RST_L but so can the EC, so we need react if it's pulled
* low. The ARM core can't trigger an interrupt if it's driving it as an output
* so we attach two internal GPIOs to the same pad.
+ * TODO: Remove this internal pullup at some point. It's only here so that
+ * boards that don't have an external pullup don't trigger due to noise.
*/
-GPIO_INT(SYS_RST_L_IN, PIN(1, 0), GPIO_INT_FALLING, sys_rst_asserted)
+GPIO_INT(SYS_RST_L_IN, PIN(1, 0), GPIO_INT_FALLING | GPIO_PULL_UP,
+ sys_rst_asserted)
GPIO_INT(AP_ON, PIN(1, 1), GPIO_INT_RISING, device_state_on)
GPIO_INT(EC_ON, PIN(1, 2), GPIO_INT_RISING, device_state_on)
GPIO_INT(SERVO_UART1_ON, PIN(1, 3), GPIO_INT_RISING | GPIO_PULL_DOWN,
diff --git a/chip/g/rbox.c b/chip/g/rbox.c
index 2d969ec202..85f83d33ce 100644
--- a/chip/g/rbox.c
+++ b/chip/g/rbox.c
@@ -7,11 +7,6 @@
#include "hooks.h"
#include "registers.h"
-int rbox_is_asserting_ec_reset(void)
-{
- return GREAD(RBOX, ASSERT_EC_RST);
-}
-
static void rbox_release_ec_reset(void)
{
/* Let the EC go (the RO bootloader asserts it ASAP after POR) */
diff --git a/chip/g/rbox.h b/chip/g/rbox.h
deleted file mode 100644
index 5a99b11a2a..0000000000
--- a/chip/g/rbox.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Copyright 2016 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef __CROS_RBOX_H
-#define __CROS_RBOX_H
-
-/*
- * RBOX may be used to hold the EC in reset. Returns 1 if RBOX_ASSERT_EC_RST is
- * being used to hold the EC in reset and 0 if it isn't.
- */
-int rbox_is_asserting_ec_reset(void);
-#endif /* __CROS_RBOX_H */