From 83ec930b36b1e36a534e818659c78abfbed8a87d Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 14 Nov 2013 16:28:37 -0600 Subject: lm4: allow the lpc module to use GPIO for SCI The LPC module has a dedicated control for SCI#. However, certain situations require a dedicated GPIO for asserting the SCI# signal. Introduce CONFIG_SCI_GPIO to meet this requirement. BUG=chrome-os-partner:24003 BRANCH=None TEST=Built and booted rambi with dependency change. 'lidclose' and 'lidopen' cause ACPI interrupts. Change-Id: I34c5f0ba5ff60151972921f251c71d3769a9ef8b Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/176804 Reviewed-by: Randall Spangler --- chip/lm4/lpc.c | 6 ++++++ include/config.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 7bfcc35dd0..610517571c 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -141,7 +141,13 @@ static void lpc_generate_smi(void) */ static void lpc_generate_sci(void) { +#ifdef CONFIG_SCI_GPIO + gpio_set_level(CONFIG_SCI_GPIO, 0); + udelay(65); + gpio_set_level(CONFIG_SCI_GPIO, 1); +#else LM4_LPC_LPCCTL |= LM4_LPC_SCI_START; +#endif if (host_events & event_mask[LPC_HOST_EVENT_SCI]) CPRINTF("[%T sci 0x%08x]\n", diff --git a/include/config.h b/include/config.h index 002d509def..3167e00d8c 100644 --- a/include/config.h +++ b/include/config.h @@ -588,6 +588,9 @@ */ #undef CONFIG_SAVE_VBOOT_HASH +/* Allow the board to use a GPIO for the SCI# signal. */ +#undef CONFIG_SCI_GPIO + /* Support SPI interfaces */ #undef CONFIG_SPI -- cgit v1.2.1