summaryrefslogtreecommitdiff
path: root/chip/lm4/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/lm4/uart.c')
-rw-r--r--chip/lm4/uart.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/chip/lm4/uart.c b/chip/lm4/uart.c
index 96059c6e13..9d2fe0c950 100644
--- a/chip/lm4/uart.c
+++ b/chip/lm4/uart.c
@@ -159,11 +159,13 @@ int uart_init(void)
for (ch = 0; ch < 2; ch++) {
/* Disable the port */
LM4_UART_CTL(ch) = 0x0300;
+ /* Use the internal oscillator */
+ LM4_UART_CC(ch) = 0x1;
/* Set the baud rate divisor */
- LM4_UART_IBRD(ch) = (CPU_CLOCK / 16) / BAUD_RATE;
+ LM4_UART_IBRD(ch) = (INTERNAL_CLOCK / 16) / BAUD_RATE;
LM4_UART_FBRD(ch) =
- (((CPU_CLOCK / 16) % BAUD_RATE) * 64 + BAUD_RATE / 2) /
- BAUD_RATE;
+ (((INTERNAL_CLOCK / 16) % BAUD_RATE) * 64
+ + BAUD_RATE / 2) / BAUD_RATE;
/* 8-N-1, FIFO enabled. Must be done after setting
* the divisor for the new divisor to take effect. */
LM4_UART_LCRH(ch) = 0x70;