diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-04-23 16:59:08 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-24 10:59:48 -0700 |
commit | 39b0f6ce0c86a2b8adf37624c08279bfe322686e (patch) | |
tree | e827a52c64f7960224ebd5396187158e89d587e9 /chip | |
parent | be2a21338cfa108075e286e8288d5384fb21045c (diff) | |
download | chrome-ec-39b0f6ce0c86a2b8adf37624c08279bfe322686e.tar.gz |
Specify the LM4 GPIOs to use for UART1
UART0 is the EC console, and it's consistent.
UART1 is the AP console that we export via servo. It was connected to a
different set of GPIOS on the BDS.
BUG=chrome-os-partner:18343
TEST=build link, bds
BRANCH=none
Change-Id: Ib4c10fd4d2b7a8ffb4e41e216528d4760ba50de3
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48975
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/lm4/uart.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chip/lm4/uart.c b/chip/lm4/uart.c index bc5cadb3fe..3aebbac269 100644 --- a/chip/lm4/uart.c +++ b/chip/lm4/uart.c @@ -145,16 +145,17 @@ DECLARE_IRQ(LM4_IRQ_UART1, uart_1_interrupt, 2); */ static void configure_gpio(void) { -#ifdef BOARD_link /* UART0 RX and TX are GPIO PA0:1 alternate function 1 */ gpio_set_alternate_function(LM4_GPIO_A, 0x03, 1); + +#if defined(CONFIG_UART1_GPIOS_PC4_5) /* UART1 RX and TX are GPIO PC4:5 alternate function 2 */ gpio_set_alternate_function(LM4_GPIO_C, 0x30, 2); -#else - /* UART0 RX and TX are GPIO PA0:1 alternate function 1 */ - gpio_set_alternate_function(LM4_GPIO_A, 0x03, 1); +#elif defined(CONFIG_UART1_GPIOS_PB0_1) /* UART1 RX and TX are GPIO PB0:1 alternate function 1*/ gpio_set_alternate_function(LM4_GPIO_B, 0x03, 1); +#else +#error "Must put UART1 GPIOs somewhere" #endif } |