ARM: SMDKC100: remove magic values from uart setup structures
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 18 May 2010 09:30:49 +0000 (11:30 +0200)
committerBen Dooks <ben-linux@fluff.org>
Thu, 20 May 2010 05:36:59 +0000 (14:36 +0900)
This patch introduces nice defines for the initial values for UART devices
on SMDKC100.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s5pc100/mach-smdkc100.c

index f2bce11..b6f8a58 100644 (file)
 #include <plat/fb.h>
 #include <plat/iic.h>
 
-#define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
-#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
-#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define S5PC100_UCON_DEFAULT   (S3C2410_UCON_TXILEVEL |        \
+                                S3C2410_UCON_RXILEVEL |        \
+                                S3C2410_UCON_TXIRQMODE |       \
+                                S3C2410_UCON_RXIRQMODE |       \
+                                S3C2410_UCON_RXFIFO_TOI |      \
+                                S3C2443_UCON_RXERR_IRQEN)
+
+#define S5PC100_ULCON_DEFAULT  S3C2410_LCON_CS8
+
+#define S5PC100_UFCON_DEFAULT  (S3C2410_UFCON_FIFOMODE |       \
+                                S3C2440_UFCON_RXTRIG8 |        \
+                                S3C2440_UFCON_TXTRIG16)
 
 static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = {
        [0] = {
                .hwport      = 0,
                .flags       = 0,
-               .ucon        = 0x3c5,
-               .ulcon       = 0x03,
-               .ufcon       = 0x51,
+               .ucon        = S5PC100_UCON_DEFAULT,
+               .ulcon       = S5PC100_ULCON_DEFAULT,
+               .ufcon       = S5PC100_UFCON_DEFAULT,
        },
        [1] = {
                .hwport      = 1,
                .flags       = 0,
-               .ucon        = 0x3c5,
-               .ulcon       = 0x03,
-               .ufcon       = 0x51,
+               .ucon        = S5PC100_UCON_DEFAULT,
+               .ulcon       = S5PC100_ULCON_DEFAULT,
+               .ufcon       = S5PC100_UFCON_DEFAULT,
        },
        [2] = {
                .hwport      = 2,
                .flags       = 0,
-               .ucon        = 0x3c5,
-               .ulcon       = 0x03,
-               .ufcon       = 0x51,
+               .ucon        = S5PC100_UCON_DEFAULT,
+               .ulcon       = S5PC100_ULCON_DEFAULT,
+               .ufcon       = S5PC100_UFCON_DEFAULT,
        },
        [3] = {
                .hwport      = 3,
                .flags       = 0,
-               .ucon        = 0x3c5,
-               .ulcon       = 0x03,
-               .ufcon       = 0x51,
+               .ucon        = S5PC100_UCON_DEFAULT,
+               .ulcon       = S5PC100_ULCON_DEFAULT,
+               .ufcon       = S5PC100_UFCON_DEFAULT,
        },
 };