bk://bk.arm.linux.org.uk/linux-2.6-rmk
ben-linux@org.rmk.(none)[rmk]|ChangeSet|20050128221431|64943 ben-linux

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/28 14:23:08-08:00 akpm@bix.(none) 
#   Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/28 14:23:02-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/28 22:14:31+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2440/1: S3C2410 - serial auto-flow-control enable
#   
#   Patch from Ben Dooks
#   
#   Patch from Shannon Holland
#   Enable automatic flow control if requested.
#   
#   Signed-off-by: Shannon Holland
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-s3c2410/regs-serial.h
#   2005/01/28 11:11:43+00:00 ben-linux@org.rmk.(none) +3 -0
#   [PATCH] 2440/1: S3C2410 - serial auto-flow-control enable
# 
# drivers/serial/s3c2410.c
#   2005/01/28 11:13:32+00:00 ben-linux@org.rmk.(none) +5 -1
#   [PATCH] 2440/1: S3C2410 - serial auto-flow-control enable
# 
# ChangeSet
#   2005/01/28 22:08:02+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2439/1: S3C2410 - serial driver parity selection
#   
#   Patch from Ben Dooks
#   
#   Patch from Dimitry Andric.
#   The s3c2410 serial driver selects the opposite parity
#   mode if parity is enabled.
#   
#   Signed-off-by: Dimitry Andric
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# drivers/serial/s3c2410.c
#   2005/01/28 10:49:52+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2439/1: S3C2410 - serial driver parity selection
# 
# ChangeSet
#   2005/01/28 22:01:24+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2438/1: S3C2410 - fix IO address calculations
#   
#   Patch from Ben Dooks
#   
#   Patch from Dimitry Andric.
#   The include/asm-arm/arch-s3c2410/io.h file converts
#   PC style port addresses to real ARM addresses, and
#   needs to return an `void __iomem *` to avoid a number
#   of warnings:
#     CC      drivers/ide/ide-iops.o
#   drivers/ide/ide-iops.c: In function `ide_insw':
#   drivers/ide/ide-iops.c:49: warning: passing arg 1 of `__raw_readsw' makes pointer from integer without a cast
#   drivers/ide/ide-iops.c: In function `ide_insl':
#   drivers/ide/ide-iops.c:59: warning: passing arg 1 of `__raw_readsl' makes pointer from integer without a cast
#   drivers/ide/ide-iops.c: In function `ide_outsw':
#   drivers/ide/ide-iops.c:79: warning: passing arg 1 of `__raw_writesw' makes pointer from integer without a cast
#   drivers/ide/ide-iops.c: In function `ide_outsl':
#   drivers/ide/ide-iops.c:89: warning: passing arg 1 of `__raw_writesl' makes pointer from integer without a cast
#     CC      lib/iomap.o
#   lib/iomap.c: In function `ioread8_rep':
#   lib/iomap.c:140: warning: passing arg 1 of `__raw_readsb' makes pointer from integer without a cast
#   lib/iomap.c: In function `ioread16_rep':
#   lib/iomap.c:144: warning: passing arg 1 of `__raw_readsw' makes pointer from integer without a cast
#   lib/iomap.c: In function `ioread32_rep':
#   lib/iomap.c:148: warning: passing arg 1 of `__raw_readsl' makes pointer from integer without a cast
#   lib/iomap.c: In function `iowrite8_rep':
#   lib/iomap.c:156: warning: passing arg 1 of `__raw_writesb' makes pointer from integer without a cast
#   lib/iomap.c: In function `iowrite16_rep':
#   lib/iomap.c:160: warning: passing arg 1 of `__raw_writesw' makes pointer from integer without a cast
#   lib/iomap.c: In function `iowrite32_rep':
#   lib/iomap.c:164: warning: passing arg 1 of `__raw_writesl' makes pointer from integer without a cast
#   
#   Signed-off-by: Dimitry Andric
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-s3c2410/io.h
#   2005/01/28 10:58:36+00:00 ben-linux@org.rmk.(none) +3 -6
#   [PATCH] 2438/1: S3C2410 - fix IO address calculations
# 
# ChangeSet
#   2005/01/15 17:59:46-08:00 akpm@bix.(none) 
#   Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/15 17:59:40-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/13 16:36:43-08:00 akpm@bix.(none) 
#   Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
#   into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/13 16:36:39-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/13 16:33:42-08:00 akpm@bix.(none) 
#   Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/13 16:33:38-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# CREDITS
#   2005/01/13 16:33:38-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/12 12:14:51-08:00 akpm@bix.(none) 
#   Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
#   into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/12 12:14:47-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/11 21:32:02-08:00 akpm@bix.(none) 
#   Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
#   into bix.(none):/usr/src/bk-arm
# 
# CREDITS
#   2005/01/11 21:31:56-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/11 11:47:36-08:00 akpm@bix.(none) 
#   Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/11 11:47:31-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/10 20:25:29-08:00 akpm@bix.(none) 
#   Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/10 20:25:24-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
# ChangeSet
#   2005/01/10 14:38:10-08:00 akpm@bix.(none) 
#   Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
#   into bix.(none):/usr/src/bk-arm
# 
# MAINTAINERS
#   2005/01/10 14:38:06-08:00 akpm@bix.(none) +0 -0
#   Auto merged
# 
diff -Nru a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
--- a/drivers/serial/s3c2410.c	2005-01-28 14:28:12 -08:00
+++ b/drivers/serial/s3c2410.c	2005-01-28 14:28:12 -08:00
@@ -744,11 +744,12 @@
 	unsigned long flags;
 	unsigned int baud, quot;
 	unsigned int ulcon;
+	unsigned int umcon;
 
 	/*
 	 * We don't support modem control lines.
 	 */
-	termios->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR);
+	termios->c_cflag &= ~(HUPCL | CMSPAR);
 	termios->c_cflag |= CLOCAL;
 
 	/*
@@ -806,8 +807,10 @@
 	if (termios->c_cflag & CSTOPB)
 		ulcon |= S3C2410_LCON_STOPB;
 
+	umcon = (termios->c_cflag & CRTSCTS) ? S3C2410_UMCOM_AFC : 0;
+
 	if (termios->c_cflag & PARENB) {
-		if (!(termios->c_cflag & PARODD))
+		if (termios->c_cflag & PARODD)
 			ulcon |= S3C2410_LCON_PODD;
 		else
 			ulcon |= S3C2410_LCON_PEVEN;
@@ -821,6 +824,7 @@
 
 	wr_regl(port, S3C2410_ULCON, ulcon);
 	wr_regl(port, S3C2410_UBRDIV, quot);
+	wr_regl(port, S3C2410_UMCON, umcon);
 
 	dbg("uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n",
 	    rd_regl(port, S3C2410_ULCON),
diff -Nru a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h
--- a/include/asm-arm/arch-s3c2410/io.h	2005-01-28 14:28:12 -08:00
+++ b/include/asm-arm/arch-s3c2410/io.h	2005-01-28 14:28:12 -08:00
@@ -65,12 +65,9 @@
 	return (unsigned sz)value;					\
 }
 
-static inline unsigned int __ioaddr (unsigned int port)
+static inline void __iomem *__ioaddr (unsigned int port)
 {
-	if (__PORT_PCIO(port))
-		return (unsigned int)(PCIO_BASE + (port));
-	else
-		return (unsigned int)(0 + (port));
+	return (void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + port : port);
 }
 
 #define DECLARE_IO(sz,fnsuffix,instr)	\
@@ -170,7 +167,7 @@
 	result;								\
 })
 
-#define __ioaddrc(port)	(__PORT_PCIO((port)) ? PCIO_BASE + ((port)) : ((port)))
+#define __ioaddrc(port)	((void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + (port) : (port)))
 
 #define inb(p)		(__builtin_constant_p((p)) ? __inbc(p)	   : __inb(p))
 #define inw(p)		(__builtin_constant_p((p)) ? __inwc(p)	   : __inw(p))
diff -Nru a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h
--- a/include/asm-arm/arch-s3c2410/regs-serial.h	2005-01-28 14:28:12 -08:00
+++ b/include/asm-arm/arch-s3c2410/regs-serial.h	2005-01-28 14:28:12 -08:00
@@ -113,6 +113,9 @@
 				   S3C2410_UFCON_TXTRIG0  | \
 				   S3C2410_UFCON_RXTRIG8 )
 
+#define	S3C2410_UMCOM_AFC	  (1<<4)
+#define	S3C2410_UMCOM_RTS_LOW	  (1<<0)
+
 #define S3C2410_UFSTAT_TXFULL	  (1<<9)
 #define S3C2410_UFSTAT_RXFULL	  (1<<8)
 #define S3C2410_UFSTAT_TXMASK	  (15<<4)
