All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] U-Boot-NG ?
Date: Wed, 4 Jul 2007 13:56:31 +0200	[thread overview]
Message-ID: <200707041356.32051.sr@denx.de> (raw)
In-Reply-To: <20070704112842.GJ3361@leda.ptxnet.pengutronix.de>

On Wednesday 04 July 2007, Sascha Hauer wrote:
> > You seem to never have dealt with a complex DDR2 setup with DIMM modules
> > (and optionally with ECC support). Please take a look at
> > cpu/ppc4xx/44x_spd_ddr2.c).
>
> I just did. The information this file outputs can easily be transfered
> to puts/puthex.

Yes, this could be done. I just wanted to make a point, that not all SDRAM 
configuration are "easy" and fit into a few lines of code.

> I'm not against early consoles in general, they are a 
> good thing. But you have to decide: Either you can provide a serial port
> suitable for this kind of output, or you can't because this port is
> normally occupied by a modem or something, but putting the information
> about this in such a complicated thing as the environment or even the
> device tree is just the wrong way.
>
> > It is pretty hard to come up with a common (cpu
> > platform) code that can be used by several boards supporting a variety of
> > DIMM modules. Here some debug printf's come in very handy.
> >
> > > Usually this part is about 20 lines in my bdi config. Transfering this
> > > into some lines Assembler
> >
> > I thought those days were over. I will never ever go back to having to
> > setup a SDRAM controller in assembler.
>
> I understand that you don't want to do such complicated things as done
> in spd_sdram.c in assembler (and I don't want other people to do it in
> assembler, that would be sadistic ;)

Yep. ;-)

> But there is the other end aswell: 
> On Arm it's really simple like that. You do not even have SRAM to use
> as a stack pointer (at least not as a general feature).
>
> If you want output before SDRAM init, lets do it in form of a _simple_
> console. Reading device tree contents or environment before the general
> entry point is just bloated and imho cannot be done in a way everybody
> is happy.

I'm still a little undecided, if a "simple" output mechanism is enough. Of 
course you can life with a hardwired baudrate on most systems, so that you 
don't have to read the environment. But there will be some systems where the 
user configured a different baudrate and the outputs from the DDR2 init 
routine will not be readable.

But you are right: Making this step hardcoded makes the overall design much 
more simple. So that would be a "Good Thing" (TM).

> Even netconsole was already mentioned somewhere. This can 
> simply not be implemented on other architectures than powerpc because of
> the lack of SRAM.

Yes, something like netconsole has to be initializes quite late in the bootup 
process.

> I once wondered why it takes _so_ long to get a prompt on my MPC5200
> board. The solution was simple: U-Boot was busy reading the environment
> from EEPROM several times.

Yes. That is one of the reasons, why it is strongly discouraged to use I2C 
EEPROM for environment storage.

> Once for the checksum, once again for std* 
> settings and then for the baudrate setting. I was unable to fix it
> though because my only chance was to #ifdef all around the place and
> completely change the startup prodedure for my $SPECIAL_BOARD
>
> > > or C code is a piece of cake.
> >
> > Ah, ok. At least C.
> >
> > > If you have to
> > > read some i2c data to get initialization settings, you have to do some
> > > bits more and I understand that one wants to have some putc/puthex to
> > > check if sane values are read. But again, this is lowlevel work and
> > > once it's running can forget about this.
> >
> > No, you can't. Since the user might replace another DIMM module. Or even
> > the board manufacturer.
>
> Board manufactures should be able to buy DIMM modules which are
> compatible with the board or have some 'verbose early debug U-Boot' in
> place which they can use when testing new DIMMs.

That's the way it *should* be. But unfortunately this is not always the case. 
At least we have seen it happen before, that not supported modules were 
shipped. :-(

> And when I buy new DIMMs for my PC the 'no memory' beep tells me that
> this module is not compatible. I do not need more information (I could
> not make use of it anyway).

If no output on the serial console always means: "problem with memory", than 
this would be an easy indication for SDRAM problems. But I have seen lots of 
other errors, that lead to a hangup in the very early boot stage. Most of the 
time *before* SDRAM is initialized.

Don't get me wrong. I generally like this 2 stage approach. For example it 
fits the NAND booting support (see nand_spl/*) where a small (4k on 4xx) 
first stage loader is needed. I'm just a little hesitant about dropping the 
full featured printf in early boot stages.

Best regards,
Stefan

=====================================================================
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:[~2007-07-04 11:56 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-30  2:08 [U-Boot-Users] U-Boot-NG ? Wolfgang Denk
2007-06-30  9:40 ` Robert Schwebel
2007-06-30 22:42   ` Carsten Schlote
2007-07-01 15:39     ` Wolfgang Denk
2007-07-02  9:58       ` Carsten Schlote
2007-07-01 15:17   ` Wolfgang Denk
2007-07-02 11:47     ` Sascha Hauer
2007-07-02 13:34       ` Carsten Schlote
2007-07-02 16:47 ` Sascha Hauer
2007-07-02 17:22   ` Jerry Van Baren
2007-07-02 18:42     ` Sascha Hauer
2007-07-02 23:39       ` Wolfgang Denk
2007-07-03  0:09         ` Sascha Hauer
2007-07-03  1:46           ` Grant Likely
2007-07-03  9:44             ` Sascha Hauer
2007-07-03 15:36               ` Grant Likely
2007-07-03 20:40                 ` Wolfgang Denk
2007-07-04  8:35                 ` Robert Schwebel
2007-07-04 13:47                   ` Wolfgang Denk
2007-07-04 15:25                   ` Grant Likely
2007-07-03 22:58             ` Wolfgang Denk
2007-07-03  7:22           ` Wolfgang Denk
2007-07-03  9:02             ` Sascha Hauer
2007-07-06 11:53             ` [U-Boot-Users] 回复: " Songmao Tian
2007-07-02 18:25   ` Håvard Skinnemoen
2007-07-02 18:58     ` Sascha Hauer
2007-07-02 19:53       ` Håvard Skinnemoen
2007-07-02 19:02   ` Carsten Schlote
2007-07-02 19:26     ` Sascha Hauer
2007-07-02 20:37       ` Carsten Schlote
2007-07-02 21:56         ` Sascha Hauer
2007-07-02 19:54     ` Carsten Schlote
2007-07-03 11:02       ` Sascha Hauer
2007-07-03 15:35         ` Carsten Schlote
2007-07-03 16:52           ` Grant Likely
2007-07-03 17:18             ` Ulf Samuelsson
2007-07-03 18:01               ` Grant Likely
2007-07-03 17:58             ` Sascha Hauer
2007-07-03 18:05               ` Grant Likely
2007-07-03 18:09                 ` Rune Torgersen
2007-07-03 18:17                   ` Grant Likely
2007-07-03 18:43                     ` Rune Torgersen
2007-07-03 18:54                       ` Grant Likely
2007-07-03 19:12                         ` Rune Torgersen
2007-07-03 19:21                           ` Grant Likely
2007-07-03 19:27                             ` Rune Torgersen
2007-07-03 19:30                               ` Grant Likely
2007-07-03 19:40                                 ` Rune Torgersen
2007-07-03 19:59                             ` Wolfgang Grandegger
2007-07-03 21:14                               ` Wolfgang Denk
2007-07-03 21:13                             ` Wolfgang Denk
2007-07-03 22:59                               ` Grant Likely
2007-07-03 23:13                                 ` Wolfgang Denk
2007-07-04  5:22                                   ` Andrew Dyer
2007-07-04  5:34                                     ` Grant Likely
2007-07-04 13:38                                       ` Wolfgang Denk
2007-07-04 16:00                                       ` Andrew Dyer
2007-07-04 11:46                                   ` Sascha Hauer
2007-07-04 11:53                                     ` Stefan Roese
2007-07-04 12:01                                       ` Sascha Hauer
2007-07-04 13:53                                       ` Wolfgang Denk
2007-07-04 15:39                                         ` Grant Likely
2007-07-04 18:49                                           ` Wolfgang Denk
2007-07-04 13:51                                     ` Wolfgang Denk
2007-07-03 19:19                     ` Jerry Van Baren
2007-07-03 21:11                       ` Wolfgang Denk
2007-07-03 21:06                     ` Wolfgang Denk
2007-07-03 18:43                   ` Sascha Hauer
2007-07-03 20:55               ` Wolfgang Denk
2007-07-04  9:32                 ` Sascha Hauer
2007-07-04 10:06                   ` Stefan Roese
2007-07-04 11:28                     ` Sascha Hauer
2007-07-04 11:56                       ` Stefan Roese [this message]
2007-07-04 12:21                         ` Robert Schwebel
2007-07-04 12:49                           ` Stefan Roese
2007-07-04 14:02                           ` Wolfgang Denk
2007-07-04 18:43                             ` Robert Schwebel
2007-07-04 19:36                               ` Wolfgang Denk
2007-07-04 20:40                                 ` Robert Schwebel
2007-07-04 22:25                                 ` Ulf Samuelsson
2007-07-05  6:04                                   ` Stefan Roese
2007-07-05  7:01                                     ` Robert Schwebel
2007-07-05  7:54                                     ` Ulf Samuelsson
2007-07-04 12:26                         ` Sascha Hauer
2007-07-04 12:37                           ` Stefan Roese
2007-07-04 13:09                           ` Carsten Schlote
2007-07-04 14:06                           ` Wolfgang Denk
2007-07-04 14:37                             ` Stefan Roese
2007-07-04 13:58                         ` Wolfgang Denk
2007-07-04 15:34                         ` Grant Likely
2007-07-04 12:48                       ` [U-Boot-Users] U-Boot 2.0 - How to proceed...? (was RE: U-Boot-NG ?) Carsten Schlote
2007-07-04 14:17                         ` Wolfgang Denk
2007-07-04 13:34                   ` [U-Boot-Users] U-Boot-NG ? Wolfgang Denk
2007-07-04 14:11                     ` Sascha Hauer
2007-07-03 20:48             ` Wolfgang Denk
2007-07-03 22:31               ` Sascha Hauer
2007-07-03 22:55                 ` Wolfgang Denk
2007-07-03 23:09             ` Scott Wood
2007-07-04  9:37               ` Clemens Koller
2007-07-03 17:30           ` Sascha Hauer
2007-07-03 18:03             ` Grant Likely
2007-07-04 14:16   ` Wolfgang Denk
2007-07-04 14:43     ` Sascha Hauer
2007-07-04 14:56       ` Wolfgang Denk
2007-07-06  6:39   ` [U-Boot-Users] 回复: " Songmao Tian
2007-07-06 11:46     ` [U-Boot-Users] ????: " Sascha Hauer
2007-07-06 13:09       ` Songmao Tian
2007-07-06 13:27         ` Sascha Hauer
2007-07-06 14:32         ` Wolfgang Denk
2007-07-06 14:53           ` Songmao Tian

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=200707041356.32051.sr@denx.de \
    --to=sr@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 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.