Messages in this thread | | | Date | Thu, 8 Feb 2007 09:07:45 +0800 | From | "Aubrey Li" <> | Subject | Re: [PATCH 2/3, try #3] Blackfin: serial driver for Blackfinarchitecture against Linux kernel 2.6.20 |
| |
On 2/8/07, Russell King <rmk+lkml@arm.linux.org.uk> wrote: > On Wed, Feb 07, 2007 at 06:49:58PM +0800, Wu, Bryan wrote: > > Thanks Russell's review, we update the serial core driver according to > > Russell's comments. Here is the change log: > > > > a) use "ttyBF" as blackfin serial name and use new serial major/minor number > > b) can accept command line serial setting like "console=ttyBF0,115200", delete the baud rate setting macros > > c) termios can be changed on the fly > > Since you're not implementing the ability to handle INPCK, BRKINT, PARMRK, > IGNPAR and IGNBRK, please arrange for your driver to reflect the real > settings in the termios. > > In other words: > > > +static void > > +bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, > > + struct ktermios *old) > > +{ > > + struct bfin_serial_port *uart = (struct bfin_serial_port *)port; > > + unsigned long flags; > > + unsigned int baud, quot; > > + unsigned short val, ier, lcr = 0; > > + > > + switch (termios->c_cflag & CSIZE) { > > + case CS8: > > + lcr = WLS(8); > > + break; > > + case CS7: > > + lcr = WLS(7); > > + break; > > + case CS6: > > + lcr = WLS(6); > > + break; > > + case CS5: > > + lcr = WLS(5); > > + break; > > + default: > > + printk(KERN_ERR "%s: word lengh not supported\n", > > + __FUNCTION__); > > + } > > + > > + if (termios->c_cflag & CSTOPB); > > + lcr |= STB; > > + if (termios->c_cflag & PARENB) { > > + lcr |= PEN; > > + if (!(termios->c_cflag & PARODD)) > > + lcr |= EPS; > > + } > > Insert here: > termios->c_iflag |= INPCK | BRKINT | PARMRK; > termios->c_iflag &= ~(IGNPAR | IGNBRK); > > This way applications will know that these controls are not implemented > for this port.
Thanks a lot to point it out. I'll fix this and re-send the patch.
Regards, -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |