public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gary Jennejohn <garyj@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2 V2] IOMUX: Add console multiplexing support.
Date: Mon, 20 Oct 2008 15:57:32 +0200	[thread overview]
Message-ID: <20081020155732.2653f2d7@ernst.jennejohn.org> (raw)
In-Reply-To: <20081020132453.DC51B835697A@gemini.denx.de>

On Mon, 20 Oct 2008 15:24:53 +0200
Wolfgang Denk <wd@denx.de> wrote:

Dear Wolfgang Denk,

> Is there another part of the patch, part 1/2, too?
>

Yes, but I did this part first because it's small and easily generated.
Since it also affects net I wanted to get it to the custodian.  The other
part adds the console multiplexing and isn't directly related to this.
Note this is V2 of the patch and the original version also depended on
CONFIG_IO_MUX, which we decided in this ML wasn't really relevant.

> In message <20081020135849.371fe4d1@ernst.jennejohn.org> you wrote:
> >
> > When both CONFIG_SYS_CONSOLE_IS_IN_ENV and CONFIG_NETCONSOLE are defined the
> > user can have stdout set to nc (netconsole).
> >
> > This causes problems because u-boot will try to write to nc as soon as
> > GD_FLG_DEVINIT is set in gd->flags, which happens before the network devices
> > are initialized in net/eth.c.  This results in error messages being spewed
> > out.
>
> It seems this can  happen  only  if  CONFIG_SYS_CONSOLE_IS_IN_ENV  is
> defined, right?
>

Correct, as I stated in the comment.  Note that it isn't evident in the patch,
but the console_init_r() which I changed is #ifdef CONFIG_SYS_CONSOLE_IS_IN_ENV
(there's another version in the #else-branch which isn't).

> > To prevent this problem set GD_FLG_DEVINIT in net/eth.c:eth_initialize(), after
> > the network devices have been initialized, instead of in
> > common/console.c:console_init_r().
>
> I have to admit that I don't like the idea of splitting the
> GD_FLG_DEVINIT into several, unrelated parts of the code.
>

I don't like it too much myself, but it seemed like the logical approach
to me at the time I made this modification.

> Would it not make more sense to have the netconsole  part  wait  with
> output  until it's been initialized? And/or move the netweork init to
> an earlier point, when netconsole is enabled?
>

Not a bad idea.  I think it would be most logical to do it in the
netconsole code, rather than moving up the network initialization.

I'll take a look at that.

---
Gary Jennejohn
*********************************************************************
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
*********************************************************************

  reply	other threads:[~2008-10-20 13:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-14 14:45 [U-Boot] [PATCH 2/2] IOMUX: Add console multiplexing support Gary Jennejohn
2008-09-14 16:07 ` Wolfgang Denk
2008-09-14 17:19   ` Gary Jennejohn
2008-09-14 18:34     ` Wolfgang Denk
2008-09-15  8:46       ` Gary Jennejohn
2008-09-15 11:08         ` Wolfgang Denk
2008-10-20 11:58 ` [U-Boot] [PATCH 2/2 V2] " Gary Jennejohn
2008-10-20 13:24   ` Wolfgang Denk
2008-10-20 13:57     ` Gary Jennejohn [this message]
2008-10-20 16:26       ` Gary Jennejohn
2008-10-20 19:43         ` Wolfgang Denk
2008-10-20 20:13           ` Ben Warren
2008-10-21  9:45             ` Gary Jennejohn
2008-10-21 10:34               ` Wolfgang Denk
2008-10-21 11:32                 ` Gary Jennejohn
2008-10-20 19:32       ` Wolfgang Denk

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=20081020155732.2653f2d7@ernst.jennejohn.org \
    --to=garyj@denx.de \
    --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