summaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_imx.c
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@isonoe.(none)>2007-10-18 00:00:02 +0200
committerJuergen Beisert <jbe@isonoe.(none)>2007-10-18 00:00:02 +0200
commite1c9102d3bf0664a20e55e5709983bf1790d1029 (patch)
tree0921e396ecc7aba28c131c9f8e599bcc79b9109e /drivers/serial/serial_imx.c
parentc054a3682dc169d05300f244b0aaff9b22892c5e (diff)
downloadbarebox-e1c9102d3bf0664a20e55e5709983bf1790d1029.tar.gz
make it work with all current CPUs
Diffstat (limited to 'drivers/serial/serial_imx.c')
-rw-r--r--drivers/serial/serial_imx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index b547b6c..14f3059 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -154,14 +154,17 @@
* create default values for different platforms
*/
#ifdef CONFIG_ARCH_IMX1
+# define UCR1_VAL (UCR1_UARTCLKEN)
# define UCR3_VAL 0
# define UCR4_VAL (UCR4_CTSTL_32 | UCR4_REF16)
#endif
#ifdef CONFIG_ARCH_IMX27
+# define UCR1_VAL (UCR1_UARTCLKEN)
# define UCR3_VAL (0x700 | UCR3_RXDMUXSEL)
# define UCR4_VAL UCR4_CTSTL_32
#endif
#ifdef CONFIG_ARCH_IMX31
+# define UCR1_VAL (0)
# define UCR3_VAL (0x700 | UCR3_RXDMUXSEL)
# define UCR4_VAL UCR4_CTSTL_32
#endif
@@ -186,7 +189,7 @@ static int imx_serial_init_port(struct console_device *cdev)
struct device_d *dev = cdev->dev;
ulong base = dev->map_base;
- UCR1(base) = UCR1_UARTCLKEN;
+ UCR1(base) = UCR1_VAL;
UCR2(base) = UCR2_WS | UCR2_IRTS;
UCR3(base) = UCR3_VAL;
UCR4(base) = UCR4_VAL;
@@ -199,7 +202,7 @@ static int imx_serial_init_port(struct console_device *cdev)
/* Configure FIFOs */
UFCR(base) = 0xa81;
-#ifdef CONFIG_ARCH_IMX27
+#if defined(CONFIG_ARCH_IMX27) || defined(CONFIG_ARCH_IMX31)
ONEMS(base) = imx_serial_reffreq(base) / 1000;
#endif