[U-Boot] [PATCH V2 5/9] serial_mxc: add support for MX51 processor

Stefano Babic
2010-01-13T09:50:55Z

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>
---
drivers/serial/serial_mxc.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index acc5b7d..4718775 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -20,6 +20,8 @@
#include <common.h>
#ifdef CONFIG_MX31
#include <asm/arch/mx31.h>
+#elif defined(CONFIG_MX51)
+#include <asm/arch/imx-regs.h>
#else
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
@@ -49,8 +51,14 @@
#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 mxxx UART driver"
#endif

/* Register definitions */
@@ -168,6 +176,8 @@ void serial_setbrg (void)
{
#ifdef CONFIG_MX31
u32 clk = mx31_get_ipg_clk();
+#elif defined(CONFIG_MX51)
+ u32 clk = imx_get_uartclk();
#else
u32 clk = imx_get_perclk1();
#endif
--
1.6.3.3