summaryrefslogtreecommitdiff
path: root/board/zinger/hardware.c
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-07-23 09:09:24 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-25 03:42:38 +0000
commit701bbe8764b0682ce3b21f0dd0b9642290282d86 (patch)
tree4d12b9f8b9b92f7820f578c35411e2e6c493b33b /board/zinger/hardware.c
parent7da0f8ff687cfbebd90286a79d7111c5f72a6be6 (diff)
downloadchrome-ec-701bbe8764b0682ce3b21f0dd0b9642290282d86.tar.gz
zinger: fix USART register macro bug
Fix bug in which we were using the wrong index to the USART register macros. This bug was recently introduced in: https://chromium-review.googlesource.com/208488 BUG=none BRANCH=none TEST=load code on zinger and verify serial console works Change-Id: I03142a8cafb68e0cbbcba4b720e7ec89fe20110b Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/209557 Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'board/zinger/hardware.c')
-rw-r--r--board/zinger/hardware.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/zinger/hardware.c b/board/zinger/hardware.c
index bf25155f55..cf0921c990 100644
--- a/board/zinger/hardware.c
+++ b/board/zinger/hardware.c
@@ -126,15 +126,15 @@ static void adc_init(void)
static void uart_init(void)
{
/* set baudrate */
- STM32_USART_BRR(UARTN) =
+ STM32_USART_BRR(UARTN_BASE) =
DIV_ROUND_NEAREST(CPU_CLOCK, CONFIG_UART_BAUD_RATE);
/* UART enabled, 8 Data bits, oversampling x16, no parity */
- STM32_USART_CR1(UARTN) =
+ STM32_USART_CR1(UARTN_BASE) =
STM32_USART_CR1_UE | STM32_USART_CR1_TE | STM32_USART_CR1_RE;
/* 1 stop bit, no fancy stuff */
- STM32_USART_CR2(UARTN) = 0x0000;
+ STM32_USART_CR2(UARTN_BASE) = 0x0000;
/* DMA disabled, special modes disabled, error interrupt disabled */
- STM32_USART_CR3(UARTN) = 0x0000;
+ STM32_USART_CR3(UARTN_BASE) = 0x0000;
}
static void timers_init(void)