From: Luka Perkov <uboot@lukaperkov.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] fix CFI flash driver for 8-bit bus support
Date: Tue, 14 Feb 2012 01:51:28 +0100 [thread overview]
Message-ID: <20120214005128.GA26487@w500.lan> (raw)
In-Reply-To: <20120213103230.F187225E9F5@gemini.denx.de>
Hi Wolfgang,
thank you for your pointers. Like I have said I'm not the one that
submited v1 and in v2 I only changed what was pointed after v1.
On Mon, Feb 13, 2012 at 11:32:30AM +0100, Wolfgang Denk wrote:
> > - udelay(1);
>
> This is an unrelated change. It has no place in this patch.
Yes, you are right. I'll leave this alone for now.
> Please submit separately, with respective comments for why uyou are
> doing this, if you really want to change this.
>
> > static flash_sect_t find_sector (flash_info_t * info, ulong addr)
> > {
> > static flash_sect_t saved_sector = 0; /* previously found sector */
> > - static flash_info_t *saved_info = 0; /* previously used flash bank */
> > flash_sect_t sector = saved_sector;
> >
> > - if ((info != saved_info) || (sector >= info->sector_count))
> > - sector = 0;
>
> I think this is bogus. Please clean up your patch!
Yes, this probably is not needed.
> > - p[i] = flash_read_uchar(info, start + i);
> > + p[i] = flash_read_uchar(info, start + (i * 2));
>
> On which systems / in which configurations has this code been tested?
Answer at the end of this mail.
> > - /* Issue FLASH reset command */
> > - flash_cmd_reset(info);
>
> really?
>
> > for (cfi_offset=0;
> > cfi_offset < sizeof(flash_offset_cfi) / sizeof(uint);
> > cfi_offset++) {
> > + /* Issue FLASH reset command */
> > + flash_cmd_reset(info);
>
> really??
Nobody commented this in v1. I'll test without this change.
> > if (flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP, 'Q')
> > - && flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 1, 'R')
> > - && flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'Y')) {
> > + && flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'R')
> > + && flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 4, 'Y')) {
> > flash_read_cfi(info, qry, FLASH_OFFSET_CFI_RESP,
> > sizeof(struct cfi_qry));
...
> Which configurations have been actually tested?
DLink DNS323, board that I'm working on (orion5x, arm926ejs). Also it
was tested in v1:
http://lists.denx.de/pipermail/u-boot/2011-April/089611.html
I will test this also on a MIPS board that I have in the next few days.
I did not have time to do it today.
I'll resend v3 after more testing and code reading.
Regards,
Luka
prev parent reply other threads:[~2012-02-14 0:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 1:30 [U-Boot] [PATCH v2] fix CFI flash driver for 8-bit bus support Luka Perkov
2012-02-13 10:32 ` Wolfgang Denk
2012-02-14 0:51 ` Luka Perkov [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=20120214005128.GA26487@w500.lan \
--to=uboot@lukaperkov.net \
--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.