From: Alex BASTOS <alebas@televes.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: Write buffer programming for AMD flash chips
Date: Fri, 29 Apr 2005 09:55:19 +0200 [thread overview]
Message-ID: <1114761319.4271e8673c86b@webmail.televes.com:443> (raw)
In-Reply-To: <51DB8827D393D411BB69003048003F46018FE4E6@tvesntr>
Hi Thomas,
> I had a look at your patch and I believe that it does almost the same than
> mine. From a point of readability and extendability I would prefer it,
> whereas my patch would save some memory.
So on, IMHO memory saving may be preferable in this case.
However, maybe someone else in the list (Wolfgang?) has
anything to say.
If this is the way we decide to go, I can apply your patch and
make changes for 8 bit support.
> A missing part in your patch is checking whether data to be written are
> aligned with the flash chips write buffer. This is done with the following
> hunk for the write_buff function:
>
> buffered_size = (info->portwidth / info->chipwidth);
> buffered_size *= info->buffer_size;
> while (cnt >= info->portwidth) {
> - i = buffered_size > cnt ? cnt : buffered_size;
> + /* write buffer until next buffered_size aligned boundary */
> + i = buffered_size - (wp % buffered_size);
> + if (i>cnt)
> + i = cnt;
> if ((rc = flash_write_cfibuffer (info, wp, src, i)) != ERR_OK)
> return rc;
> i -= (i % info->portwidth);
>
> In our case, the lack of this code lead to errors when writing the
> environment to flash. The reason is that environment writing is done in 3
> steps and this results in not buffer-aligned write cycles. The code above
> calculates the correct buffer size (i) depending on the first address (wp) to
> be written
OK. I will change this.
Best Regards,
Alex
next parent reply other threads:[~2005-04-29 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51DB8827D393D411BB69003048003F46018FE4E6@tvesntr>
2005-04-29 7:55 ` Alex BASTOS [this message]
2005-04-26 8:43 [U-Boot-Users] RE: Write buffer programming for AMD flash chips Bastos Fernandez Alexandre
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='1114761319.4271e8673c86b@webmail.televes.com:443' \
--to=alebas@televes.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