summaryrefslogtreecommitdiff
path: root/include/drivers
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2014-07-14 15:43:21 +0100
committerSoby Mathew <soby.mathew@arm.com>2014-07-28 10:44:04 +0100
commit462c8350f6ed6b950609de1f72f00098440d3354 (patch)
tree13dc775dad5e865dce64b90f229f01728d89c8c5 /include/drivers
parentfce5f7501afad3fb1aa0cbff3c3d666e2c0f36f9 (diff)
Parametrize baudrate and UART clock during console_init()
This patch adds baud rate and UART clock frequency as parameters to the pl011 driver api console_init(). This allows each platform to specify UART clock and baud rate according to their specific hardware implementation. Fixes ARM-software/tf-issues#215 Change-Id: Id13eef70a1c530e709b34dd1e6eb84db0797ced2
Diffstat (limited to 'include/drivers')
-rw-r--r--include/drivers/arm/pl011.h8
-rw-r--r--include/drivers/console.h3
2 files changed, 2 insertions, 9 deletions
diff --git a/include/drivers/arm/pl011.h b/include/drivers/arm/pl011.h
index e01d8b2..7c4df62 100644
--- a/include/drivers/arm/pl011.h
+++ b/include/drivers/arm/pl011.h
@@ -78,14 +78,6 @@
#define PL011_UARTCR_LBE (1 << 7) /* Loopback enable */
#define PL011_UARTCR_UARTEN (1 << 0) /* UART Enable */
-#if !defined(PL011_BAUDRATE)
-#define PL011_BAUDRATE 115200
-#endif
-
-#if !defined(PL011_CLK_IN_HZ)
-#define PL011_CLK_IN_HZ 24000000
-#endif
-
#if !defined(PL011_LINE_CONTROL)
/* FIFO Enabled / No Parity / 8 Data bit / One Stop Bit */
#define PL011_LINE_CONTROL (PL011_UARTLCR_H_FEN | PL011_UARTLCR_H_WLEN_8)
diff --git a/include/drivers/console.h b/include/drivers/console.h
index e285909..f144ab9 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -31,7 +31,8 @@
#ifndef __CONSOLE_H__
#define __CONSOLE_H__
-void console_init(unsigned long base_addr);
+int console_init(unsigned long base_addr,
+ unsigned int uart_clk, unsigned int baud_rate);
int console_putc(int c);
int console_getc(void);