public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Steven Scholz <steven.scholz@imc-berlin.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: U-Boot for AT91RM9200DK
Date: Sun, 26 Oct 2003 11:56:05 +0100	[thread overview]
Message-ID: <3F9BA845.8050505@imc-berlin.de> (raw)
In-Reply-To: <20031025185221.41E66C59E4@atlas.denx.de>

Dear Wolfgang,

>>I thought of something like this in start.S:
>>
>>#ifdef CFG_USE_EXT_CRYSTAL
>>	enable_main_oscillator;
>>#endif
>>
>>/* set up PLL */
>>	set PLLA to CFG_PLLAR
>>	set PLLB to CFG_PLLBR
>>...
> 
> 
> Looks  clean  to  me.  Probably  even  better  would   be   to   call
> "init_clocks"  (or  a  function  with  a similar name) in start.S for
> _all_ boards, including the "at91rm9200dk".

???
Should the function init_clocks() be in start.S or in board specific files?
As it is done with memsetup() or platform() in other ARM implementations?
Or should we write cpu_init(), board_init() etc. like in the PPC code?

> Just for the record: the "at91rm9200dk" ist  just  one  out  of  many
> boards.  It  is in no way better than any other board. "at91rm9200dk"
> dependend code shall be removed from the files in the  cpu/at91rm9200
> directory.
It's better in that everybody could buy such a board and run U-Boot on it. :o)

>>And the user just has to define CFG_USE_EXT_CRYSTAL, CFG_PLLAR etc in his board 
>>specific header file. Of course without the need to submit his configuration to 
>>the U-Boot CVS.
> 
> I don't understand this last sentence.
> 
> Either you are maintaining his own  private  version  of  U-Boot  (in
> which  case we don't care, and you don't need to ask for help on this
> mailing list which is dedicated to the _public_ source tree only), or
> you are working with the public version of U-Boot, in which case your
> board configuration obviously resides in the U-Boot CVS tree.

IMHO:

U-Boot code should be written in a way to make it very easy to port it to new, 
custom hardware without making (too many) changes on the generic and common code 
(as for instance the stuff inc cpu/at91rm92000/ directory).

In the best case just creating a new board include file with the appropriate 
definitions (like #undef  CFG_USE_EXT_CRYSTAL; #define CFG_PLLA 0x12345678 etc.) 
should be enough to bring U-Boot up.

So if we write the code in cpu/at91rm92000/ generic enough then porting U-Boot 
to a new board is (at a first step) merely writing an new yourboard.h.
Now if that's all I did I see no need to "bloat u-boot with unnecessary code". 
(Of course the CFG_ and CONFIG_ stuff must be documented e.g. in 
doc/README.AT91RM9200).

That's what I meant. Do we realy need thousends of yourboard.h just containing 
different values for CFG_PLLAR? I think we need them for "standard" eval boards. 
And for boards with some special feature.
So I put my efford to provide generic code that could be used by others. That's 
why I rewrote my FPGA loading code, submitted a patch although my old board 
specific code was working good. And I will provide the code for our board in a 
while when I think it shows others how to use this code.

Argh... You know what I meant? I am not sure if I could make myself understood.

-- 
Steven Scholz

  reply	other threads:[~2003-10-26 10:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-18 13:12 [U-Boot-Users] Maintainer of AT91RM9200DK??? Steven Scholz
2003-10-18 13:45 ` [U-Boot-Users] " Rick Bronson
     [not found]   ` <3F914731.1000207@imc-berlin.de>
     [not found]     ` <E1AAs6Y-0000eT-00@c-67-164-61-95.client.comcast.net>
     [not found]       ` <3F914F82.3060502@imc-berlin.de>
     [not found]         ` <E1AAsEW-0000fj-00@c-67-164-61-95.client.comcast.net>
2003-10-24  9:01           ` [U-Boot-Users] U-Boot for AT91RM9200DK Steven Scholz
2003-10-24 14:05             ` [U-Boot-Users] " Rick Bronson
2003-10-24 14:18               ` Steven Scholz
2003-10-24 14:30                 ` Rick Bronson
2003-10-24 14:41                   ` Steven Scholz
2003-10-24 15:40                     ` Rick Bronson
2003-10-25 18:45                       ` Wolfgang Denk
2003-10-25 18:52                     ` Wolfgang Denk
2003-10-26 10:56                       ` Steven Scholz [this message]
2003-10-26 12:17                         ` Wolfgang Denk
2003-10-25 18:41                   ` Wolfgang Denk
2003-10-27  7:15               ` Steven Scholz
2003-10-27  8:02                 ` Wolfgang Denk
2003-10-27  8:25                   ` Steven Scholz
2003-10-27 10:16                     ` Wolfgang Denk
2003-10-27 11:23                       ` Steven Scholz
2003-10-27 11:53                         ` Wolfgang Denk
2003-10-27 14:58                           ` Steven Scholz
2003-10-27 15:38                 ` Rick Bronson
2003-10-27 16:21                   ` Wolfgang Denk
2003-10-25 18:32             ` [U-Boot-Users] " Wolfgang Denk
2003-10-18 20:39 ` [U-Boot-Users] Maintainer of AT91RM9200DK??? Wolfgang Denk
2003-10-20 13:49   ` [U-Boot-Users] about arm7tdmi Joe
2003-10-20 15:10     ` Wolfgang Denk
2003-10-21  4:58       ` [U-Boot-Users] one by one problem " Joe
2003-10-21  9:25         ` 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=3F9BA845.8050505@imc-berlin.de \
    --to=steven.scholz@imc-berlin.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