public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Angelo Dureghello <sysamfw@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] mtd/cfi: SST39VF3201B flash model not properly handled
Date: Thu, 29 Nov 2012 13:03:35 +0100	[thread overview]
Message-ID: <20121129120333.GA7468@angel3> (raw)

Dear All,

as Wolfgang Denx suggested me, i am trying to use the u-boot CFI driver with 
a CFI flash (SSTVF3201B).

This flash chip allows erasing/writing blocks of 4 KBytes (called "sectors" 
in the SST datasheet), or 64 KBytes (called "blocks"). 

The command sequence table for this flash shows 2 different commands to 
operate on these 2 kind of blocks. 0x50 is for "sector erase" and "0x30" (the
command used from u-boot CFI driver as AMD_CMD_ERASE_SECTOR) is for the
64KB "block" erase.

The issue:
now, u-boot CFI driver works fine on 64KB boundary ranges, but if i expect
to erase a 4KB sector size i get a full 64KB block erased. 

Proposed solution:
Initially, a single sector size definition would be good enough for this chip, 
so the user should specify if he wants a 64 or 4 KB sector to be used, using
some CFG_X.
CFI driver, through queries, should be able to identify this particular chip
so that it can be handled in a specific way from the CFI driver (cmd 0x50 for
4KB secotrs, or 0x30 for 64KB secotrs).

I am thinking about to post a patch on this.
Anyway, until new AMCORE board patch is not accepted, there is the chance 
this can result as a "dead code" if no-one use this flash chip except me.
 
So, before i start, please let me know how to proceed, maybe is better to use
a specific flash.c for my board for now ? 
Or if you think a patch can be useful, any suggestion on how to implement it 
is really welcome.


Best Regards,
Angelo Dureghello

             reply	other threads:[~2012-11-29 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 12:03 Angelo Dureghello [this message]
2012-11-29 12:13 ` [U-Boot] mtd/cfi: SST39VF3201B flash model not properly handled Stefan Roese
2012-11-29 15:30   ` Angelo Dureghello

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=20121129120333.GA7468@angel3 \
    --to=sysamfw@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