summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2010-01-20 18:20:19 +0100
committerTom Rix <Tom.Rix@windriver.com>2010-03-07 12:36:35 -0600
commit71d64c0e4fa5910c15eca175a8f3b0e1c1d6711c (patch)
treeaf86627ea74f346c7b67c06786de6707b83faf3e /drivers
parent67adcee0e091f0935e7dd722404d2a864cdecbe7 (diff)
downloadu-boot-71d64c0e4fa5910c15eca175a8f3b0e1c1d6711c.tar.gz
serial_mxc: add support for MX51 processor
The patch adds support for the Freescale mx51 processor. Signed-off-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Fred Fan <fanyefeng@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial_mxc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index acc5b7d83b..b21c9c3e9d 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -49,8 +49,18 @@
#define UART_PHYS 0x1001b000
#elif defined(CONFIG_SYS_MX27_UART6)
#define UART_PHYS 0x1001c000
+#elif defined(CONFIG_SYS_MX51_UART1)
+#define UART_PHYS UART1_BASE_ADDR
+#elif defined(CONFIG_SYS_MX51_UART2)
+#define UART_PHYS UART2_BASE_ADDR
+#elif defined(CONFIG_SYS_MX51_UART3)
+#define UART_PHYS UART3_BASE_ADDR
#else
-#error "define CONFIG_SYS_MX31_UARTx to use the mx31 UART driver"
+#error "define CONFIG_SYS_MXxx_UARTx to use the MXC UART driver"
+#endif
+
+#ifdef CONFIG_SERIAL_MULTI
+#warning "MXC driver does not support MULTI serials."
#endif
/* Register definitions */
@@ -166,11 +176,7 @@ DECLARE_GLOBAL_DATA_PTR;
void serial_setbrg (void)
{
-#ifdef CONFIG_MX31
- u32 clk = mx31_get_ipg_clk();
-#else
- u32 clk = imx_get_perclk1();
-#endif
+ u32 clk = imx_get_uartclk();
if (!gd->baudrate)
gd->baudrate = CONFIG_BAUDRATE;