summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2011-04-22 01:45:11 +0000
committerStefan Reinauer <stepan@openbios.org>2011-04-22 01:45:11 +0000
commit6aca1e8b26e712d056816ba936fb4d5834a07467 (patch)
treeb2a1336d6d32358d88db8743070a6105b00feb53 /src/console
parent3e4fb9d1a12c6a4b69702badc7223fec3b6e8ddb (diff)
downloadcoreboot-6aca1e8b26e712d056816ba936fb4d5834a07467.tar.xz
The UART divider should be calculated based on the base frequency
and baudrate, not hardcoded in addition to that. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6538 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/console')
-rw-r--r--src/console/uart8250_console.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/console/uart8250_console.c b/src/console/uart8250_console.c
index 53ca3a762e..03db400319 100644
--- a/src/console/uart8250_console.c
+++ b/src/console/uart8250_console.c
@@ -25,7 +25,13 @@ static void ttyS0_init(void)
{
static const unsigned char div[8] = { 1, 2, 3, 6, 12, 24, 48, 96 };
int b_index = 0;
- unsigned int divisor = CONFIG_TTYS0_DIV;
+ /* TODO the divisor calculation is hard coded to standard UARTs. Some
+ * UARTs won't work with these values. This should be a property of the
+ * UART used, worst case a Kconfig variable. For now live with hard
+ * codes as the only devices that might be different are the iWave
+ * iRainbowG6 and the OXPCIe952 card (and the latter is memory mapped)
+ */
+ unsigned int divisor = 115200 / CONFIG_TTYS0_BAUD;
if (get_option(&b_index, "baud_rate") == 0) {
divisor = div[b_index];