synclink_gt: add serial bit order control
authorPaul Fulghum <paulkf@microgate.com>
Tue, 22 Jul 2008 10:21:39 +0000 (11:21 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Jul 2008 20:03:29 +0000 (13:03 -0700)
Add control of hardware serial bit order between LSB first
(default/standard) and MSB first.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/synclink_gt.c
include/linux/synclink.h

index 0e59cf54adaf88e4eede6003866c73dca9fb1dce..3cfc9e1f8882094a8e4ed6049b495556b7535e26 100644 (file)
@@ -4403,6 +4403,8 @@ static void msc_set_vcr(struct slgt_info *info)
                break;
        }
 
+       if (info->if_mode & MGSL_INTERFACE_MSB_FIRST)
+               val |= BIT4;
        if (info->signals & SerialSignal_DTR)
                val |= BIT3;
        if (info->signals & SerialSignal_RTS)
index 45f6bc82d317237b8f0359e529432695d217d42c..c844a229acc937e42b28d201168847e3ed789e45 100644 (file)
 #define MGSL_INTERFACE_RTS_EN   0x10
 #define MGSL_INTERFACE_LL       0x20
 #define MGSL_INTERFACE_RL       0x40
+#define MGSL_INTERFACE_MSB_FIRST 0x80
 
 typedef struct _MGSL_PARAMS
 {