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] [PATCH 4/5] cfi_flash: handle 'chip size exceeds address window' situation
Date: Thu, 21 Oct 2010 22:19:22 +0200	[thread overview]
Message-ID: <20101021201922.C0BB41359B7@gemini.denx.de> (raw)
In-Reply-To: <1287674413-3900-5-git-send-email-yanok@emcraft.com>

Dear Stefan,

In message <1287674413-3900-5-git-send-email-yanok@emcraft.com> you wrote:
> On some boards we have flash mapped high in the address space with
> considerably small window (say 0xFE000000 and 32MB). When we install
> bigger chip (say 64MB) on such a board strange things happen
> (flash_write() doesn't work at all, for ex). That's because cfi_flash
> driver doesn't care about window size at all.
> Of course, cleanest solution would probably be to just extend address
> window to be able to map the whole flash but for legacy/compatibility
> reasons some people prefer just truncate the flash size and never use
> the upper part.
> This patch adds an option for cfi_flash driver to handle this situation
> properly. To achieve this we add the new function cfi_flash_bank_size()
> which can be provided by the board code and weak-aliased to default
> implementation that returns value from the CONFIG_SYS_FLASH_BANKS_SIZES
> array if it's defined or 0 otherwise (the last case is added for
> compatibility).
> If non-zero flash bank size is provided and detected chip size is bigger
> than provided address window size the warning will be displayed and
> flash chip will be truncated.
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
>  drivers/mtd/cfi_flash.c |   28 +++++++++++++++++++++++-----
>  1 files changed, 23 insertions(+), 5 deletions(-)

If this patch looks OK with you, then please ACK it; I suggest I will
pull it with the resto of this patch series directly then.

Thanks.

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
It's not an optical illusion, it just looks like one.   -- Phil White

  reply	other threads:[~2010-10-21 20:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 15:20 [U-Boot] Various clean-ups for a4m072 board support Ilya Yanok
2010-10-21 15:20 ` [U-Boot] [PATCH 1/5] a4m072: changes to the default environment Ilya Yanok
2010-10-23 19:27   ` Wolfgang Denk
2010-10-21 15:20 ` [U-Boot] [PATCH 2/5] a4m072: change 'display' command implementation Ilya Yanok
2010-10-23 19:28   ` Wolfgang Denk
2010-10-21 15:20 ` [U-Boot] [PATCH 3/5] led_display: remove unused DISPLAY_MARK define Ilya Yanok
2010-10-23 19:28   ` Wolfgang Denk
2010-10-21 15:20 ` [U-Boot] [PATCH 4/5] cfi_flash: handle 'chip size exceeds address window' situation Ilya Yanok
2010-10-21 20:19   ` Wolfgang Denk [this message]
2010-10-22 10:39   ` Stefan Roese
2010-10-23 19:27     ` Wolfgang Denk
2010-10-23 19:38   ` Wolfgang Denk
2010-10-21 15:20 ` [U-Boot] [PATCH 5/5] a4m072: add CONFIG_SYS_FLASH_BANKS_SIZES define Ilya Yanok
2010-10-23 19:39   ` 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=20101021201922.C0BB41359B7@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