summaryrefslogtreecommitdiff
path: root/chip/lm4/gpio.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-01-11 11:36:28 -0800
committerRandall Spangler <rspangler@chromium.org>2012-01-11 11:37:55 -0800
commit1f2f8627c3ad74beb4be6ab8709aa7c260692be1 (patch)
tree6686740565f56c32fdeb9a042cb1782d4cc1e127 /chip/lm4/gpio.c
parenta767d9b22b248095b609a4751ca46ec2b18dbb13 (diff)
downloadchrome-ec-1f2f8627c3ad74beb4be6ab8709aa7c260692be1.tar.gz
Add JTAG module
This just ensures the JTAG pins are reset to JTAG function on warm reboot. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:7448 TEST=none Change-Id: I0cccdbe7a68c228db7f354898ed30598e9fabff0
Diffstat (limited to 'chip/lm4/gpio.c')
-rw-r--r--chip/lm4/gpio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c
index 974f849d8e..bc0e32fc31 100644
--- a/chip/lm4/gpio.c
+++ b/chip/lm4/gpio.c
@@ -18,7 +18,8 @@
struct gpio_info {
const char *name;
int port; /* Port (LM4_GPIO_*) */
- int mask; /* Bitmask on that port (0x01 - 0x80) */
+ int mask; /* Bitmask on that port (0x01 - 0x80; 0x00 =
+ signal not implemented) */
void (*irq_handler)(enum gpio_signal signal);
};
@@ -201,6 +202,11 @@ static int command_gpio_set(int argc, char **argv)
return EC_ERROR_UNKNOWN;
}
+ if (!signal_info[i].mask) {
+ uart_puts("Signal is not implemented; ignoring request.\n");
+ return EC_SUCCESS;
+ }
+
v = strtoi(argv[2], &e, 0);
if (*e) {
uart_puts("Invalid signal value.\n");