Commit 71d64c0e4fa5910c15eca175a8f3b0e1c1d6711c
Committed by
Tom Rix
1 parent
67adcee0e0
Exists in
master
and in
54 other branches
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>
Showing 1 changed file with 12 additions and 6 deletions Side-by-side Diff
drivers/serial/serial_mxc.c
... | ... | @@ -49,10 +49,20 @@ |
49 | 49 | #define UART_PHYS 0x1001b000 |
50 | 50 | #elif defined(CONFIG_SYS_MX27_UART6) |
51 | 51 | #define UART_PHYS 0x1001c000 |
52 | +#elif defined(CONFIG_SYS_MX51_UART1) | |
53 | +#define UART_PHYS UART1_BASE_ADDR | |
54 | +#elif defined(CONFIG_SYS_MX51_UART2) | |
55 | +#define UART_PHYS UART2_BASE_ADDR | |
56 | +#elif defined(CONFIG_SYS_MX51_UART3) | |
57 | +#define UART_PHYS UART3_BASE_ADDR | |
52 | 58 | #else |
53 | -#error "define CONFIG_SYS_MX31_UARTx to use the mx31 UART driver" | |
59 | +#error "define CONFIG_SYS_MXxx_UARTx to use the MXC UART driver" | |
54 | 60 | #endif |
55 | 61 | |
62 | +#ifdef CONFIG_SERIAL_MULTI | |
63 | +#warning "MXC driver does not support MULTI serials." | |
64 | +#endif | |
65 | + | |
56 | 66 | /* Register definitions */ |
57 | 67 | #define URXD 0x0 /* Receiver Register */ |
58 | 68 | #define UTXD 0x40 /* Transmitter Register */ |
... | ... | @@ -166,11 +176,7 @@ |
166 | 176 | |
167 | 177 | void serial_setbrg (void) |
168 | 178 | { |
169 | -#ifdef CONFIG_MX31 | |
170 | - u32 clk = mx31_get_ipg_clk(); | |
171 | -#else | |
172 | - u32 clk = imx_get_perclk1(); | |
173 | -#endif | |
179 | + u32 clk = imx_get_uartclk(); | |
174 | 180 | |
175 | 181 | if (!gd->baudrate) |
176 | 182 | gd->baudrate = CONFIG_BAUDRATE; |