[U-Boot] [PATCH V2 2/2] ARMV7: Fixed baudrate setting in pl01x driver
matt.waddel at linaro.org
matt.waddel at linaro.org
Thu Jul 29 05:12:47 CEST 2010
From: Matt Waddel <matt.waddel at linaro.org>
The pl01x serial driver was lacking the code to switch baudrates from the
command line. Fixed by simply saving the new baudrate and calling
serial_init() again.
Signed-off-by: Matt Waddel <matt.waddel at linaro.org>
---
drivers/serial/serial_pl01x.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index c645cef..5cd5b9c 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -41,13 +41,14 @@
* Versatile PB has four UARTs.
*/
#define CONSOLE_PORT CONFIG_CONS_INDEX
-#define baudRate CONFIG_BAUDRATE
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
static void pl01x_putc (int portnum, char c);
static int pl01x_getc (int portnum);
static int pl01x_tstc (int portnum);
+unsigned int baudRate = CONFIG_BAUDRATE;
+DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_PL010_SERIAL
@@ -183,6 +184,8 @@ int serial_tstc (void)
void serial_setbrg (void)
{
+ baudRate = gd->baudrate;
+ serial_init();
}
static void pl01x_putc (int portnum, char c)
--
1.7.0.4
More information about the U-Boot
mailing list