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] maybe a bug for flash write, CFI_CMDSET_AMD_LEGACY
Date: Wed, 15 Jul 2009 05:48:18 +0200	[thread overview]
Message-ID: <200907150548.18560.sr@denx.de> (raw)
In-Reply-To: <20078c250907141825l2edeac38td732b6a3f78b46f8@mail.gmail.com>

On Wednesday 15 July 2009 03:25:12 cheng gao wrote:
> u-boot-2009.06\drivers\mtd\cfi_flash.c
> Line: 836~845
> Function: flash_write_cfiword
>
> case CFI_CMDSET_AMD_EXTENDED:
>     case CFI_CMDSET_AMD_STANDARD:
> #ifdef CONFIG_FLASH_CFI_LEGACY
>     case CFI_CMDSET_AMD_LEGACY:
> #endif
>         sect = find_sector(info, dest);
>         flash_unlock_seq (info, sect);
>         flash_write_cmd (info, sect, info->addr_unlock1, AMD_CMD_WRITE);
>         sect_found = 1;
>         break;
>
>
> It should be :
>
>        case CFI_CMDSET_AMD_EXTENDED:
>        case CFI_CMDSET_AMD_STANDARD:
>
>         sect = find_sector(info, dest);
>         flash_unlock_seq (info, sect);
>         flash_write_cmd (info, sect, info->addr_unlock1, AMD_CMD_WRITE);
>         sect_found = 1;
>         break;
> #ifdef CONFIG_FLASH_CFI_LEGACY
>     case CFI_CMDSET_AMD_LEGACY:
>     flash_unlock_seq (info, 0);
>     flash_write_cmd (info, 0, info->addr_unlock1, AMD_CMD_WRITE);
>      sect_found = 1;
>     break;
> #endif
>
>   to make it work for SST39LF040 which is only 4k per serctor.

Take a look at the latest version of the file in mainline. It already has such 
a patch integrated:

http://git.denx.de/?p=u-boot/u-boot-cfi-
flash.git;a=commitdiff;h=b4db4a7638ef90cf0aacf7b954d9bf3043dda780

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:[~2009-07-15  3:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15  1:25 [U-Boot] maybe a bug for flash write, CFI_CMDSET_AMD_LEGACY cheng gao
2009-07-15  3:48 ` Stefan Roese [this message]

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=200907150548.18560.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.