From: Wilson Lee <wilson.lee@ni.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] serial: nulldev: Add nulldev serial driver
Date: Tue, 29 Aug 2017 04:18:57 +0000 [thread overview]
Message-ID: <1503980335.40368.16.camel@ni.com> (raw)
In-Reply-To: <CAEUhbmU=9xtz-WsWsBAi8dA-GtuZuymik+FQooi8q=Co5Zv5WQ@mail.gmail.com>
Hi Bin Meng,
On Tue, 2017-08-29 at 09:41 +0800, Bin Meng wrote:
> Hi Wilson,
>
> On Fri, Aug 25, 2017 at 11:29 AM, Wilson Lee <wilson.lee@ni.com>
> wrote:
> >
> > From: Keng Soon Cheah <keng.soon.cheah@ni.com>
> >
> > Some device the serial console's initialization cannot run early
> > during
> > the boot process. Hence, nulldev serial device is helpful on that
> > situation.
> >
> > For example, if the serial module was implemented in FPGA. Serial
> > initialization is prohibited to run until the FPGA was programmed.
> >
> I still don't fully understand this. Shouldn't the FPGA serial driver
> has some sort of register bits that determine if it's ready? And if
> not ready, the FPGA serial driver can do nothing like your null
> serial
> driver does?
>
In most case we will not implement new FPGA serial driver. For example,
we will try to implement the ns16550 serial module in FPGA and reuse
the ns16550 driver that already exist in u-boot. The ns16550 driver
will not know when is the right time to initialize the console hence
causing system halt.
This nulldev console will eventually help to prevent such situation.
Before the FPGA is ready, all the console initialization and output
will be redirect to this nulldev console. After the FPGA is ready,
"user" have the "flexibility" redirect the console to ns16550 serial
module in FPGA.
> >
> > This commit is to adding nulldev serial driver. This will allows
> > the
> > default console to be specified as a nulldev.
> >
> > Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
> > Signed-off-by: Keng Soon Cheah <keng.soon.cheah@ni.com>
> > Cc: Chen Yee Chew <chen.yee.chew@ni.com>
> > ---
> > drivers/serial/Kconfig | 7 ++++++
> > drivers/serial/Makefile | 1 +
> > drivers/serial/serial_nulldev.c | 48
> > +++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 56 insertions(+)
> > create mode 100644 drivers/serial/serial_nulldev.c
> >
> [snip]
>
> Regards,
> Bin
Thanks.
Best Regards,
Wilson Lee
next prev parent reply other threads:[~2017-08-29 4:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 3:29 [U-Boot] [PATCH v2] serial: nulldev: Add nulldev serial driver Wilson Lee
2017-08-29 1:41 ` Bin Meng
2017-08-29 4:18 ` Wilson Lee [this message]
2017-09-14 2:14 ` [U-Boot] [U-Boot, " Tom Rini
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=1503980335.40368.16.camel@ni.com \
--to=wilson.lee@ni.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox