All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] mips board with no output from console
Date: Tue, 29 Sep 2009 19:37:16 -0400	[thread overview]
Message-ID: <4AC29A2C.5000300@gmail.com> (raw)
In-Reply-To: <1254264169.23326.1337258915@webmail.messagingengine.com>

Hi myuboot,

(You should CC: the list - tap the wisdom of the crowd, plus answers get 
  archived for the next person that gets bit by the problem.)

myuboot at fastmail.fm wrote:
> Jerry,
> 
> I appreciate your input. 
> I somehow fixed the issue without really knowing the cause.

DANGER, Will Robinson!
   <http://en.wikipedia.org/wiki/Danger,_Will_Robinson>

> In the header file for the particular board I am using, I have the
> parameters for serial configuration,such as
> #define CFG_NS16550
> #define CFG_NS16550_SERIAL
> #define CFG_NS16550_REG_SIZE 4
> #define CFG_NS16550_CLK      4
> ...
> when I port it to u-boot2009.06, I double defined the parameters so that
> my existing code does not need to be changed, so I have both
> #define CFG_NS16550
> #define CFG_NS16550_SERIAL
> #define CFG_NS16550_REG_SIZE 4
> #define CFG_NS16550_CLK      4
> ...
> 
> #define CONFIG_SYS_NS16550
> #define CONFIG_SYS_NS16550_SERIAL
> #define CONFIG_SYS_NS16550_REG_SIZE 4
> #define CONFIG_SYS_NS16550_CLK      4
> ...
> 
> When I removed every thing starts with CONFIG_SYS_NS16550, the console
> is working.
> 
> Thanks. 

That is NOT the right fix.  If you grep CFG_NS16550, you will find it is 
no longer used (there was a CFG/CONFIG cleanup a little while back).
   $ find . -name "*.[ch]" | xargs grep CFG_NS16550

If you look at common/serial.c, you will find the default serial console
   struct serial_device *__default_serial_console (void)
is selected by a combination of
   #if defined(CONFIG_CONS_INDEX) && defined(CONFIG_SYS_NS16550_SERIAL)

Further, in
   void serial_initialize (void)
the combination is also used to select which register/UART channel to 
set up via
   int serial_register (struct serial_device *dev)

I suspect you did not have CONFIG_CONS_INDEX, and possible some other 
CONFIG_SYS_NS16550_SERIAL_* defines defined, so your initialization 
didn't happen correctly.  There are plenty of examples to copy from:
   $ find . -name "*.h" | xargs grep -l CONFIG_SYS_NS16550

Best regards,
gvb

[snip]

      parent reply	other threads:[~2009-09-29 23:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 23:59 [U-Boot] mips board with no output from console myuboot at fastmail.fm
2009-09-29  0:55 ` Jerry Van Baren
     [not found]   ` <1254264169.23326.1337258915@webmail.messagingengine.com>
2009-09-29 23:37     ` Jerry Van Baren [this message]

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=4AC29A2C.5000300@gmail.com \
    --to=gvb.uboot@gmail.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 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.