diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-08-05 07:16:05 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-08-05 07:16:05 -0400 |
commit | 85a75996edd0e49477cc7c9eb4bac33f02b07685 (patch) | |
tree | 5f29dbd15273adfe1a4ce4a040e5858ea1015b51 /include/asm-blackfin | |
parent | 7417c8fe2e792b771b093c14e763816f154b62b4 (diff) |
blackfin enable arbitary speed serial setting
Add the needed definitions to activate arbitary speed support on the blackfin platform.
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'include/asm-blackfin')
-rw-r--r-- | include/asm-blackfin/ioctls.h | 9 | ||||
-rw-r--r-- | include/asm-blackfin/termbits.h | 5 | ||||
-rw-r--r-- | include/asm-blackfin/termios.h | 10 |
3 files changed, 19 insertions, 5 deletions
diff --git a/include/asm-blackfin/ioctls.h b/include/asm-blackfin/ioctls.h index 8356204151db..895e3173165d 100644 --- a/include/asm-blackfin/ioctls.h +++ b/include/asm-blackfin/ioctls.h | |||
@@ -47,8 +47,13 @@ | |||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
50 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 50 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) |
51 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 51 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) |
52 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) | ||
54 | /* Get Pty Number (of pty-mux device) */ | ||
55 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) | ||
56 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | ||
52 | 57 | ||
53 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 58 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
54 | #define FIOCLEX 0x5451 | 59 | #define FIOCLEX 0x5451 |
diff --git a/include/asm-blackfin/termbits.h b/include/asm-blackfin/termbits.h index 4eac38de8ce1..f37feb7cf895 100644 --- a/include/asm-blackfin/termbits.h +++ b/include/asm-blackfin/termbits.h | |||
@@ -140,6 +140,7 @@ struct ktermios { | |||
140 | #define HUPCL 0002000 | 140 | #define HUPCL 0002000 |
141 | #define CLOCAL 0004000 | 141 | #define CLOCAL 0004000 |
142 | #define CBAUDEX 0010000 | 142 | #define CBAUDEX 0010000 |
143 | #define BOTHER 0010000 | ||
143 | #define B57600 0010001 | 144 | #define B57600 0010001 |
144 | #define B115200 0010002 | 145 | #define B115200 0010002 |
145 | #define B230400 0010003 | 146 | #define B230400 0010003 |
@@ -155,10 +156,12 @@ struct ktermios { | |||
155 | #define B3000000 0010015 | 156 | #define B3000000 0010015 |
156 | #define B3500000 0010016 | 157 | #define B3500000 0010016 |
157 | #define B4000000 0010017 | 158 | #define B4000000 0010017 |
158 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 159 | #define CIBAUD 002003600000 /* input baud rate */ |
159 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
160 | #define CRTSCTS 020000000000 /* flow control */ | 161 | #define CRTSCTS 020000000000 /* flow control */ |
161 | 162 | ||
163 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
164 | |||
162 | /* c_lflag bits */ | 165 | /* c_lflag bits */ |
163 | #define ISIG 0000001 | 166 | #define ISIG 0000001 |
164 | #define ICANON 0000002 | 167 | #define ICANON 0000002 |
diff --git a/include/asm-blackfin/termios.h b/include/asm-blackfin/termios.h index 5c41478a51c6..e31fe859650b 100644 --- a/include/asm-blackfin/termios.h +++ b/include/asm-blackfin/termios.h | |||
@@ -98,8 +98,14 @@ struct termio { | |||
98 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 98 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
99 | }) | 99 | }) |
100 | 100 | ||
101 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 101 | #define user_termios_to_kernel_termios(k, u) \ |
102 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 102 | copy_from_user(k, u, sizeof(struct termios2)) |
103 | #define kernel_termios_to_user_termios(u, k) \ | ||
104 | copy_to_user(u, k, sizeof(struct termios2)) | ||
105 | #define user_termios_to_kernel_termios_1(k, u) \ | ||
106 | copy_from_user(k, u, sizeof(struct termios)) | ||
107 | #define kernel_termios_to_user_termios_1(u, k) \ | ||
108 | copy_to_user(u, k, sizeof(struct termios)) | ||
103 | 109 | ||
104 | #endif /* __KERNEL__ */ | 110 | #endif /* __KERNEL__ */ |
105 | 111 | ||