public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Fixing IXP42x boards - some general questions
Date: Thu, 23 Dec 2010 11:55:01 +0100	[thread overview]
Message-ID: <201012231155.02005.marek.vasut@gmail.com> (raw)
In-Reply-To: <20101223101037.823D0152437@gemini.denx.de>

On Thursday 23 December 2010 11:10:37 Wolfgang Denk wrote:
> Dear Michael Schwingen,
> 
> In message <4D13175F.8030207@discworld.dascon.de> you wrote:
> > Startup code. Is the following correct?
> > 
> >  - code starts from flash, with TEXT_BASE = start of flash, ie. the code
> > 
> > is linked to flash addresses.
> 
> Correct.
> 
> >  - DATA/BSS are behind the text segment in flash, so the code may not
> > 
> > write RAM variables until relocation
> 
> Correct.
> 
> In addition, BSS is not initialized yet, so you should not even try
> reading variables in BSS, as these will contain random data.  This
> affects especially static variables that are supposed to be
> initialized with zero.
> 
> >  - code in flash sets up RAM, copies + relocates u-boot to RAM, and
> > 
> > continues there
> 
> Correct.
> 
> > Timer system.
> > 
> >  - For IXP, there are two variants of the timer system - one using
> > 
> > interrupts, and one without interrupts. Both do not work currently.
> > I have patches that fix the non-interrupt version, changing
> > CONFIG_SYS_HZ from 66666666 to 1000, bringing it in line with what most
> > other ARM platforms do.
> 
> I cannot nomment on this.  Marek?

http://download.intel.com/design/network/manuals/25248006.pdf page 411 or so.

What's the second variant ? Either way -- you should use the non-interrupt 
version. Remember, you're writing a bootloader, use the KISS principle ; you 
generally use the timer only to implement *delay() functions.

Therefore, as Wolfgang said, you use 1000 ticks per second in uboot's internal 
counting, but "convert" it from/to your real timer's ticks in timer.c

What problem do you have there? Also, can you please let us see the patches?
> 
> > What is the preferred way of handling timers? Should CONFIG_SYS_HZ be
> > 1000 or rather the timer clock?
> 
> CONFIG_SYS_HZ must always be defiend as 1000.
> 
> > What about interrupts? Use them or avoid them?
> 
> If you can do without interrupts, I would do that, because it's
> simpler.
> 
> > What about the Intel reference board (IXDP425)? Previously, I used that
> > one as a reference on how things should be done, but it looks broken,
> > too. I can prepare patches for IXDP425, but I can't currently test them
> > (we should have one at work, but that might take some time).
> 
> I cannot help with that either.  Marek?

Go ahead, patches are welcome. I don't have any ixp hardware, but it looks fairy 
similar to pxa, it should be easy to review patches.
> 
> Best regards,
> 
> Wolfgang Denk

Cheers

  reply	other threads:[~2010-12-23 10:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23  9:33 [U-Boot] Fixing IXP42x boards - some general questions Michael Schwingen
2010-12-23 10:10 ` Wolfgang Denk
2010-12-23 10:55   ` Marek Vasut [this message]
2010-12-23 15:13     ` Michael Schwingen
2010-12-23 12:23   ` Michael Schwingen
2010-12-23 10:20 ` Albert ARIBAUD
2010-12-23 10:39   ` Michael Schwingen
2010-12-23 11:28     ` Albert ARIBAUD
2010-12-23 11:57       ` Michael Schwingen
2010-12-23 18:25       ` Michael Schwingen
2010-12-23 18:47         ` Albert ARIBAUD
2010-12-23 20:17           ` Michael Schwingen

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=201012231155.02005.marek.vasut@gmail.com \
    --to=marek.vasut@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox