LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Aubrey Li" <aubreylee@gmail.com>
To: "Wu, Bryan" <bryan.wu@analog.com>,
	alan@lxorguk.ukuu.org.uk, aubreylee@gmail.com,
	akpm@linux-foundation.org, rdunlap@xenotime.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3, try #3] Blackfin: serial driver for Blackfinarchitecture against Linux kernel 2.6.20
Date: Thu, 8 Feb 2007 09:07:45 +0800	[thread overview]
Message-ID: <6d6a94c50702071707w7422f911j8a8f8c4da5b3020a@mail.gmail.com> (raw)
In-Reply-To: <20070207192633.GA27194@flint.arm.linux.org.uk>

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

  reply	other threads:[~2007-02-08  1:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 10:49 Wu, Bryan
2007-02-07 19:26 ` Russell King
2007-02-08  1:07   ` Aubrey Li [this message]
2007-02-08 17:20 ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d6a94c50702071707w7422f911j8a8f8c4da5b3020a@mail.gmail.com \
    --to=aubreylee@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bryan.wu@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --subject='Re: [PATCH 2/3, try #3] Blackfin: serial driver for Blackfinarchitecture against Linux kernel 2.6.20' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).