public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] CFI driver and P33 64M flash
Date: Thu, 25 Sep 2008 17:52:28 +0200	[thread overview]
Message-ID: <20080925155228.413BE248EE@gemini.denx.de> (raw)
In-Reply-To: <200809251653.30832.sr@denx.de>

Dear Stefan Roese,

In message <200809251653.30832.sr@denx.de> you wrote:
>
> This will not work. Take a look at the lwmon5 configuration. It has a similar 
> Intel FLASH which has two chips inside:
> 
> #define CFG_FLASH0              0xFC000000
> #define CFG_FLASH1              0xF8000000
> #define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }
> 
> #define CFG_MAX_FLASH_BANKS     2
> 
> ...
> 
> You need to change the addresses for your 32MB version though.

Please note that I really dislike such static configurations which
will break as soon as the size of the flash banks changes.

Right from the begining U-Boot  was  always  designed  to  allow  for
dynamic  adjustment  to  the actual memory sizes found on the boards,
and we should just use this capability.

Assuming a 32 bit configuration, above should rather be written as:

#define CFG_FLASH0	(0 - flash_info[0].size)
#define CFG_FLASH1	(CFG_FLASH0 - flash_info[1].size)
#define CFG_FLASH_BANKS_LIST    { CFG_FLASH1, CFG_FLASH0 }
...

This may require a preliminary mapping of the  flash  banks  that  is
then  fixed  after  the  CFI driver determined the real size; see for
example how this was done for the  TQM8xx*  boards  (of  course  this
needs to be adapted for 4xx, but you get the idea).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We don't care.  We don't have to.  We're the Phone Company."

  reply	other threads:[~2008-09-25 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25 13:50 [U-Boot] CFI driver and P33 64M flash Felix Radensky
2008-09-25 14:53 ` Stefan Roese
2008-09-25 15:52   ` Wolfgang Denk [this message]
2008-09-25 16:08   ` Felix Radensky
2009-08-04 20:48 ` psdof
  -- strict thread matches above, loose matches on Subject: below --
2008-09-26  7:00 yusuf khan

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=20080925155228.413BE248EE@gemini.denx.de \
    --to=wd@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