All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subhashini Rao Beerisetty <subhashbeerisetty@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org,
	kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: tty: uart: custom speed
Date: Mon, 4 Mar 2019 20:19:44 +0530	[thread overview]
Message-ID: <CAPY=qRS1R9GV+=k8e93BSaEJzTkpSaeQnF4sKQF2QW+CpUSWPg@mail.gmail.com> (raw)
In-Reply-To: <20190304132302.GA9869@kroah.com>

On Mon, Mar 4, 2019 at 6:53 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Mar 04, 2019 at 05:46:54PM +0530, Subhashini Rao Beerisetty wrote:
> >   Hi All,
> >
> >
> > I’ve an UART ports on Xilinx FPGA board and it gets connected to PC
> > via PCIe bus. I could not find any kernel serial driver which supports
> > our hardware so I plan to develop a new driver. I see two approaches
> > to develop an UART driver i.e. either by using tty_register_driver()
> > or an uart_register_driver().
> >
> >
> > Regarding my UART module, it has a counter of 16 bits and runs on a
> > 32Mhz clock. It supports all the standard & non-standard baud’s up to
> > 4Mbps.
>
> What type of UART is it?  Odds are it is based on an existing design, no
> one creates a brand-new UART anymore.  Hopefully.  If not, what a
> waste...

For UART type, I see the permitted types are none, 8250, 16450, 16550,
16550A, 16650, 16650V2, 16654, 16750, 16850, 16950, and 16954 etc.
Looking into the data sheet I haven’t found any register or parameter
defining any of those UART types.  Is ‘UART type’ is determined from a
register settings point of view or a pinout point of view?

>
> > If I used struct tty_operations, I noticed that baud rate changing is
> > done via “.set_termios” API, but this method only supports standard
> > baud rates. I’d like to know why this API does not support
> > non-standard baud rates?
>
> Why do you think it does not?
From data sheet point of view I'm clear on how to set the non-standard
baud rate, even I exposed a custom Ioctl for this. But here I’m trying
to understand how it is achieved by using available UART kernel
framework.
For non-standard baud rate requests, observed that
tty->termios.c_ispeed & tty->termios.c_ospeed set to 38400. I did not
understood why it changes?

>
> Anyway, use the uart interface as odds are your uart is already
> supported.  Get the data sheet and start reading :)
>
> good luck,
>
> greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

       reply	other threads:[~2019-03-04 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPY=qRSrw7JxAbORoUHckxcMRjk16zYP7nc2zakGd411JMjGjA@mail.gmail.com>
     [not found] ` <20190304132302.GA9869@kroah.com>
2019-03-04 14:49   ` Subhashini Rao Beerisetty [this message]
2019-03-04 14:57     ` tty: uart: custom speed Greg KH
2019-03-04 15:23       ` Subhashini Rao Beerisetty
2019-03-04 17:16         ` Vladimir Zapolskiy
2019-03-04 18:47         ` Grant Edwards
2019-03-04 12:12 Subhashini Rao Beerisetty

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='CAPY=qRS1R9GV+=k8e93BSaEJzTkpSaeQnF4sKQF2QW+CpUSWPg@mail.gmail.com' \
    --to=subhashbeerisetty@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-serial@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.