* [U-Boot-Users] CFI driver
@ 2004-10-20 19:26 York Sun
2004-10-20 19:59 ` Yuli Barcohen
2004-10-20 20:19 ` Yuli Barcohen
0 siblings, 2 replies; 16+ messages in thread
From: York Sun @ 2004-10-20 19:26 UTC (permalink / raw)
To: u-boot
I am debugging flash driver for MPC8555CDS board. The driver is
drivers/cfi_flash.c. I have two boards. One is rev 1.0, with AM29LV641D.
The other is rev 1.1, with AM29LV641M.
The problem is polling DQ6 after programming. The current driver in
U-boot 1.1.2 works well for AM29LV641M. As for AM29LV641D, the
programming hangs after writing about 13KB. I track it down to
"flash_is_busy()" function. When the problem occurs, the DQ6 keeps
toggling. If I change the algorithm to polling DQ7, no problem occurs.
Shawn has a similar problem
http://lists.infradead.org/pipermail/linux-mtd/2004-March/009402.html.
Maybe we should use DQ7 rather than DQ6.
Another issue is the CFI driver might not work for all CFI compatible
flash. For example, Micro MT28F640J3. Micro uses status register instead
of DQ# polling. Somehow, we still need board specific driver.
--
Best regards,
York Sun, Ph.D
Metrowerks
Freescale Semiconductor Inc.
Phone: (512) 996-5252
Email: yorksun at freescale.com
This email, and any associated attachments have been classified as:
[x] Freescale Semiconductor General Business
[ ] Freescale Semiconductor Internal Use Only
[ ] Freescale Semiconductor Confidential Proprietary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041020/27a976b5/attachment.htm
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-10-20 19:26 [U-Boot-Users] CFI driver York Sun
@ 2004-10-20 19:59 ` Yuli Barcohen
2004-10-20 20:19 ` Yuli Barcohen
1 sibling, 0 replies; 16+ messages in thread
From: Yuli Barcohen @ 2004-10-20 19:59 UTC (permalink / raw)
To: u-boot
>>>>> York Sun writes:
...
York> Another issue is the CFI driver might not work for all CFI
York> compatible flash. For example, Micro MT28F640J3. Micro uses
York> status register instead of DQ# polling. Somehow, we still need
York> board specific driver.
So what's the problem? The CFI driver supports both methods, polling for
AMD-compatible chips and reading status register for Intel-compatible
ones. It works well on original Intel 28F640J3. Maybe Micro is not
recognised correctly as Intel-compatible? If it's the case, it's just a
bug which is easily fixed. You don't need board specific driver for
these flashes.
BTW, please, don't send HTML to the list.
--
========================================================================
Yuli Barcohen | Phone +972-9-765-1788 | Software Project Leader
yuli at arabellasw.com | Fax +972-9-765-7494 | Arabella Software, Israel
========================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-10-20 19:26 [U-Boot-Users] CFI driver York Sun
2004-10-20 19:59 ` Yuli Barcohen
@ 2004-10-20 20:19 ` Yuli Barcohen
2004-10-20 20:40 ` York Sun
1 sibling, 1 reply; 16+ messages in thread
From: Yuli Barcohen @ 2004-10-20 20:19 UTC (permalink / raw)
To: u-boot
>>>>> York Sun writes:
York> I am debugging flash driver for MPC8555CDS board. The driver
York> is drivers/cfi_flash.c. I have two boards. One is rev 1.0,
York> with AM29LV641D. The other is rev 1.1, with AM29LV641M.
York> The problem is polling DQ6 after programming. The current
York> driver in U-boot 1.1.2 works well for AM29LV641M. As for
York> AM29LV641D, the programming hangs after writing about 13KB. I
York> track it down to "flash_is_busy()" function. When the problem
York> occurs, the DQ6 keeps toggling. If I change the algorithm to
York> polling DQ7, no problem occurs.
I'm working now with a board (Adder87x) having exactly the same flash
(AM29LV641DL) and the driver works perfectly. I suspect that the problem
is not in the chip but in specific configuration.
York> Shawn has a similar problem
York> http://lists.infradead.org/pipermail/linux-mtd/2004-March/009402.html.
Your board uses several chips in parallel to get wider bus. The same was
on Shawn's board. In older versions of Linux CFI driver I found a bug in
the polling algorithm when more than one chip is used. I just replaced
the driver with a newer version and now it works OK. It sounds like
similar (same?) bug in the U-Boot's CFI driver.
York> Maybe we should use DQ7 rather than DQ6.
IMHO, no. Polling DQ6 is the standard for AMD-compatible flashes.
...
--
========================================================================
Yuli Barcohen | Phone +972-9-765-1788 | Software Project Leader
yuli at arabellasw.com | Fax +972-9-765-7494 | Arabella Software, Israel
========================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-10-20 20:19 ` Yuli Barcohen
@ 2004-10-20 20:40 ` York Sun
2004-10-20 21:21 ` York Sun
0 siblings, 1 reply; 16+ messages in thread
From: York Sun @ 2004-10-20 20:40 UTC (permalink / raw)
To: u-boot
Yuli,
Thanks for reply.
I am using a single chip. The problem doesn't appear EVERY programming.
It happens after programming about 13KB.
I did this test. In function "flash_status_check ( )", within the while
loop, I insert codes to read DQ7-DQ0. I got DQ6 toggling and DQ5=1. That
means "exceeded timing limit". Without a reset the program will hang in
this loop. By polling the DQ7 instead of DQ6, it went smoothly.
York
On Wed, 2004-10-20 at 15:19, Yuli Barcohen wrote:
> >>>>> York Sun writes:
>
> York> I am debugging flash driver for MPC8555CDS board. The driver
> York> is drivers/cfi_flash.c. I have two boards. One is rev 1.0,
> York> with AM29LV641D. The other is rev 1.1, with AM29LV641M.
>
> York> The problem is polling DQ6 after programming. The current
> York> driver in U-boot 1.1.2 works well for AM29LV641M. As for
> York> AM29LV641D, the programming hangs after writing about 13KB. I
> York> track it down to "flash_is_busy()" function. When the problem
> York> occurs, the DQ6 keeps toggling. If I change the algorithm to
> York> polling DQ7, no problem occurs.
>
> I'm working now with a board (Adder87x) having exactly the same flash
> (AM29LV641DL) and the driver works perfectly. I suspect that the problem
> is not in the chip but in specific configuration.
>
> York> Shawn has a similar problem
> York> http://lists.infradead.org/pipermail/linux-mtd/2004-March/009402.html.
>
> Your board uses several chips in parallel to get wider bus. The same was
> on Shawn's board. In older versions of Linux CFI driver I found a bug in
> the polling algorithm when more than one chip is used. I just replaced
> the driver with a newer version and now it works OK. It sounds like
> similar (same?) bug in the U-Boot's CFI driver.
>
> York> Maybe we should use DQ7 rather than DQ6.
>
> IMHO, no. Polling DQ6 is the standard for AMD-compatible flashes.
>
> ...
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-10-20 20:40 ` York Sun
@ 2004-10-20 21:21 ` York Sun
[not found] ` <16759.40840.186219.754326@astp0002.localdomain>
0 siblings, 1 reply; 16+ messages in thread
From: York Sun @ 2004-10-20 21:21 UTC (permalink / raw)
To: u-boot
Yuli,
I add the following test code and modified flash_status_check. I have no
error for erasing. But I got "Time out" for programming after 13KB. This
algorithm complies AMD standard, doesn't it?
Regards,
York
#define AMD_STATUS_TIMEOUT 0x20
static int flash_time_out (flash_info_t * info, flash_sect_t sect)
{
int retval;
switch (info->vendor) {
case CFI_CMDSET_AMD_STANDARD:
case CFI_CMDSET_AMD_EXTENDED:
retval = flash_isset (info, sect, 0,
AMD_STATUS_TIMEOUT);
break;
default:
retval = 0;
}
debug ("flash_time_out: %d\n", retval);
return retval;
}
static int flash_status_check (flash_info_t * info, flash_sect_t sector,
ulong tout, char *prompt)
{
ulong start,now;
/* Wait for command completion */
start = get_timer (0);
while (flash_is_busy (info, sector)) {
if (flash_time_out(info,sector)) {
if (flash_is_busy (info, sector)) {
flash_write_cmd (info, sector, 0,
info->cmd_reset);
printf("Time out\n");
}
}
if ((now=get_timer (start)) > info->erase_blk_tout *
CFG_HZ) {
printf ("Flash %s timeout at address %lx data
%lx\n",
prompt, info->start[sector],
flash_read_long (info, sector, 0));
flash_write_cmd (info, sector, 0,
info->cmd_reset);
return ERR_TIMOUT;
}
}
return ERR_OK;
}
On Wed, 2004-10-20 at 15:40, York Sun wrote:
> Yuli,
>
> Thanks for reply.
>
> I am using a single chip. The problem doesn't appear EVERY programming.
> It happens after programming about 13KB.
>
> I did this test. In function "flash_status_check ( )", within the while
> loop, I insert codes to read DQ7-DQ0. I got DQ6 toggling and DQ5=1. That
> means "exceeded timing limit". Without a reset the program will hang in
> this loop. By polling the DQ7 instead of DQ6, it went smoothly.
>
> York
>
> On Wed, 2004-10-20 at 15:19, Yuli Barcohen wrote:
> > >>>>> York Sun writes:
> >
> > York> I am debugging flash driver for MPC8555CDS board. The driver
> > York> is drivers/cfi_flash.c. I have two boards. One is rev 1.0,
> > York> with AM29LV641D. The other is rev 1.1, with AM29LV641M.
> >
> > York> The problem is polling DQ6 after programming. The current
> > York> driver in U-boot 1.1.2 works well for AM29LV641M. As for
> > York> AM29LV641D, the programming hangs after writing about 13KB. I
> > York> track it down to "flash_is_busy()" function. When the problem
> > York> occurs, the DQ6 keeps toggling. If I change the algorithm to
> > York> polling DQ7, no problem occurs.
> >
> > I'm working now with a board (Adder87x) having exactly the same flash
> > (AM29LV641DL) and the driver works perfectly. I suspect that the problem
> > is not in the chip but in specific configuration.
> >
> > York> Shawn has a similar problem
> > York> http://lists.infradead.org/pipermail/linux-mtd/2004-March/009402.html.
> >
> > Your board uses several chips in parallel to get wider bus. The same was
> > on Shawn's board. In older versions of Linux CFI driver I found a bug in
> > the polling algorithm when more than one chip is used. I just replaced
> > the driver with a newer version and now it works OK. It sounds like
> > similar (same?) bug in the U-Boot's CFI driver.
> >
> > York> Maybe we should use DQ7 rather than DQ6.
> >
> > IMHO, no. Polling DQ6 is the standard for AMD-compatible flashes.
> >
> > ...
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
--
Best regards,
York Sun, Ph.D
Metrowerks
Freescale Semiconductor Inc.
Phone: (512) 996-5252
Email: yorksun at freescale.com
This email, and any associated attachments have been classified as:
[x] Freescale Semiconductor General Business
[ ] Freescale Semiconductor Internal Use Only
[ ] Freescale Semiconductor Confidential Proprietary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041020/31efa762/attachment.htm
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
[not found] <E1CKMIE-00085P-Dl@sc8-sf-list1.sourceforge.net>
@ 2004-10-21 3:06 ` Sam Song
2004-10-21 3:08 ` Sam Song
1 sibling, 0 replies; 16+ messages in thread
From: Sam Song @ 2004-10-21 3:06 UTC (permalink / raw)
To: u-boot
Wed, 20 Oct 2004 14:26:11 York Sun
<yorksun@freescale.com> wrote:
> Another issue is the CFI driver might not work for
> all CFI compatible flash. For example, Micro
> MT28F640J3. Micro uses status register instead
> of DQ# polling. Somehow, we still need board
> specific driver.
Yeah. CFI driver still need to fix to support more cfi
flash. In my experience, CFI driver support Intel
FLASH better than AMD ones. I also use special flash
driver for AMD flash on RPXlite_DW. I once tested it
for Brad Kemp but no success.
=====
Best regards,
Sam
_________________________________________________________
Do You Yahoo!?
150??MP3????????????
http://music.yisou.com/
???????????????????
http://image.yisou.com
1G??1000???????????
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
[not found] <E1CKMIE-00085P-Dl@sc8-sf-list1.sourceforge.net>
2004-10-21 3:06 ` Sam Song
@ 2004-10-21 3:08 ` Sam Song
1 sibling, 0 replies; 16+ messages in thread
From: Sam Song @ 2004-10-21 3:08 UTC (permalink / raw)
To: u-boot
Wed, 20 Oct 2004 14:26:11 York Sun
<yorksun@freescale.com> wrote:
> Another issue is the CFI driver might not work for
> all CFI compatible flash. For example, Micro
> MT28F640J3. Micro uses status register instead
> of DQ# polling. Somehow, we still need board
> specific driver.
Yeah. CFI driver still need to fix to support more cfi
flash. In my experience, CFI driver support Intel
FLASH better than AMD ones. I also use special flash
driver for AMD flash on RPXlite_DW. I once tested it
for Brad Kemp but no success.
=====
Best regards,
Sam
_________________________________________________________
Do You Yahoo!?
150??MP3????????????
http://music.yisou.com/
???????????????????
http://image.yisou.com
1G??1000???????????
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
[not found] ` <16765.12175.401464.214322@astp0002.localdomain>
@ 2004-10-27 19:55 ` York Sun
2004-10-27 20:37 ` Wolfgang Denk
0 siblings, 1 reply; 16+ messages in thread
From: York Sun @ 2004-10-27 19:55 UTC (permalink / raw)
To: u-boot
Yuli,
I have confirm the problem on more boards.
On Mon, 2004-10-25 at 11:53, Yuli Barcohen wrote:
> York> Yes. I agree. I polled the DQ7 at the same address of being
> York> written. I know the AMD polling algorithm. Actually I have
> York> been using polling DQ7 for a long time. Hundreds of our boards
> York> were shipped with this algorithm. I am very sure the image has
> York> been programmed correctly.
>
> So I assume that if you program kernel image you can then successfully
> boot it. Correct?
Yes.
> York> I also found the flash_make_cmd has some defect. You cannot
> York> simply multiply the offset with the port width. That would
> York> generate error address if you are using 8-bit port
> York> width. Modification is needed for 32-bit chip width. I made
> York> modification. But I need some boards to verify.
>
> There can be bugs for the very same reason: I haven't got enough boards
> to verify all possible configuration. In particular, I've got no board
> using 8-bit port width. I received recently a board with 32-bit flash
> (2x16) and the CFI driver worked unchanged. Maybe only 4x8 needed the
> modification...
>
> I'd suggest trying this driver on a different board with the same flash
> if you've got one. This would rule out possible hardware issue. On my
> Adder, the driver works so I can't reproduce the problem in our lab.
I tried 4 more boards.
I confirm the problem on one board with the same two flash chips
(AM29LV641DH). I also found two boards with mixed chips (one AM29LV641MH
and AM29LV641DH). One of those board has problem on erasing, no problem
on programming. The other board is fine.
The problem did show up on the board with two AM29LV641MH.
I have revised the driver to support port width from 8-bit to 64-bit,
chip width from 8-bit to 32-bit. Also, I modified the driver to poll DQ6
at the same address where the date is being written to. And I add the
polling DQ7, which is not enabled by default. With these modification,
all my boards passed testing.
By the way, here is the feedback from AMD, "It is a good practice to use
the exact address where data is being written to when using the "DQ6"
method, even though in theory you don't have to."
If you want to confirm, I can generate a patch. Wolfgang?
Regards,
York
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-10-27 19:55 ` York Sun
@ 2004-10-27 20:37 ` Wolfgang Denk
0 siblings, 0 replies; 16+ messages in thread
From: Wolfgang Denk @ 2004-10-27 20:37 UTC (permalink / raw)
To: u-boot
In message <1098906900.7217.41.camel@localhost.localdomain> you wrote:
>
> If you want to confirm, I can generate a patch. Wolfgang?
Yes?
Best regards,
Wolfgang Denk
--
See us @ Embedded/Electronica Munich, Nov 09 - 12, Hall A.6 Booth 513
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Too many people are ready to carry the stool when the piano needs to
be moved.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
@ 2004-10-27 21:10 York Sun
2004-11-22 17:46 ` Jon Loeliger
0 siblings, 1 reply; 16+ messages in thread
From: York Sun @ 2004-10-27 21:10 UTC (permalink / raw)
To: u-boot
Here is the patch.
Regards,
York
--- u-boot-pq3-base/drivers/cfi_flash.c 2004-08-06 13:08:19.000000000
-0500
+++ u-boot-pq3-for-release/drivers/cfi_flash.c 2004-10-27
16:02:34.028749216 -0500
@@ -10,6 +10,11 @@
* Ed Okerson
* Modified to work with little-endian systems.
*
+ * Copyright (C) 2004
+ * York Sun
+ * Modified to support 8-bit port and 32-bit chip, not verified
+ * Modified to support polling DQ7 and DQ6 for AMD flash
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -33,16 +38,29 @@
* 01/22/2004 - Write performance enhancements for parallel chips
(Tolunay)
* 01/23/2004 - Support for x8/x16 chips (Rune Raknerud)
* 01/27/2004 - Little endian support Ed Okerson
+ * 10/26/2004 - Revised to support polling DQ7 and DQ6 for AMD flash
+ * and to support 8-bit port width on 8-bit chip
+ * and 32/64-bit port width on 32-bit chip (not verified)
by York Sun
+ * According to AMD technical support: It is a good
practice
+ * to the use exact where data is being written to when
using
+ * "DQ6" method, even though in theory you don't have
to.
*
* Tested Architectures
* Port Width Chip Width # of banks Flash Chip Board
* 32 16 1 28F128J3 seranoa/eagle
* 64 16 1 28F128J3 seranoa/falcon
+ * 16 16 2 AM29LV641DH MPC8555CDS rev
1.0
+ * 16 16 2 AM29LV641MH MPC8555CDS rev
1.0
*
*/
/* The DEBUG define must be before common to enable debugging */
-/* #define DEBUG */
+/* #define DEBUG */
+
+#define POLLING_AMD_DQ6
+#ifndef POLLING_AMD_DQ6
+#define POLLING_AMD_DQ7 /* To use polling DQ7 instead of
DQ6 for AMD algorithm */
+#endif
#include <common.h>
#include <asm/processor.h>
@@ -105,6 +123,10 @@
#define AMD_CMD_UNLOCK_START 0xAA
#define AMD_CMD_UNLOCK_ACK 0x55
+#define AMD_DQ7 0x80
+#define AMD_DQ5 0x20
+#define AMD_STATUS_TIMEOUT 0x20
+
#define AMD_STATUS_TOGGLE 0x40
#define AMD_STATUS_ERROR 0x20
#define AMD_ADDR_ERASE_START 0x555
@@ -174,14 +196,14 @@
static void flash_make_cmd (flash_info_t * info, uchar cmd, void
*cmdbuf);
static void flash_write_cmd (flash_info_t * info, flash_sect_t sect,
uint offset, uchar cmd);
static void flash_unlock_seq (flash_info_t * info, flash_sect_t sect);
-static int flash_isequal (flash_info_t * info, flash_sect_t sect, uint
offset, uchar cmd);
-static int flash_isset (flash_info_t * info, flash_sect_t sect, uint
offset, uchar cmd);
-static int flash_toggle (flash_info_t * info, flash_sect_t sect, uint
offset, uchar cmd);
+static int flash_isequal (flash_info_t * info, cfiptr_t cptr, uchar
cmd);
+static int flash_isset (flash_info_t * info, cfiptr_t cptr, uchar cmd);
+static int flash_toggle (flash_info_t * info, cfiptr_t cptr, uchar
cmd);
static int flash_detect_cfi (flash_info_t * info);
static ulong flash_get_size (ulong base, int banknum);
static int flash_write_cfiword (flash_info_t * info, ulong dest,
cfiword_t cword);
-static int flash_full_status_check (flash_info_t * info, flash_sect_t
sector,
- ulong tout, char *prompt);
+static int Data_Polling_Check(flash_info_t * info, cfiptr_t cptr,
cfiword_t cword);
+static int flash_full_status_check (flash_info_t * info, cfiptr_t cptr,
cfiword_t cword, ulong tout, char *prompt);
#ifdef CFG_FLASH_USE_BUFFER_WRITE
static int flash_write_cfibuffer (flash_info_t * info, ulong dest,
uchar * cp, int len);
#endif
@@ -189,9 +211,21 @@
/*----------------------------------------------------------------------
-
* create an address based on the offset and the port width
*/
+static const uint offset_multiply[9][5]={ /* chip width = 0
(dummy), 1 (8-bit), 2 (16-bit), 3 (dummy), 4(32-bit) */
+ {0,0,0,0,0}, /* dummy */
+ {0,2,0,0,0}, /* port width = 1
(8-bit) */
+ {0,4,2,0,0}, /* port width = 2
(16-bit) */
+ {0,0,0,0,0}, /* dummy */
+ {0,8,4,0,4}, /* port width = 4
(32-bit) */
+ {0,0,0,0,0}, /* 5, dummy */
+ {0,0,0,0,0}, /* 6, dummy */
+ {0,0,0,0,0}, /* 7, dummy */
+ {0,16,8,0,8}, /* port width = 8
(64-bit) */
+ };
+
inline uchar *flash_make_addr (flash_info_t * info, flash_sect_t sect,
uint offset)
{
- return ((uchar *) (info->start[sect] + (offset *
info->portwidth)));
+ return ((uchar *) (info->start[sect] + (offset *
offset_multiply[info->portwidth][info->chipwidth])));
}
#ifdef DEBUG
@@ -347,8 +381,12 @@
{
int rcode = 0;
int prot;
+ cfiword_t cword;
+ cfiptr_t cptr;
flash_sect_t sect;
+ cword.c = 0xff;
+
if (info->flash_id != FLASH_MAN_CFI) {
puts ("Can't erase unknown flash type - aborted\n");
return 1;
@@ -393,11 +431,11 @@
info->vendor);
break;
}
-
- if (flash_full_status_check
- (info, sect, info->erase_blk_tout, "erase"))
{
+ cptr.cp = flash_make_addr(info,sect,0);
+ if (flash_full_status_check(info,cptr,cword,
info->erase_blk_tout,"erase") ) {
rcode = 1;
- } else
+ }
+ else
putc ('.');
}
}
@@ -416,8 +454,43 @@
return;
}
- printf ("CFI conformant FLASH (%d x %d)",
+ printf ("CFI compatible FLASH (%d port width with %d chip
width)\n",
(info->portwidth << 3), (info->chipwidth << 3));
+ printf ("Command set is ");
+ switch (info->vendor) {
+ case CFI_CMDSET_INTEL_EXTENDED:
+ printf ("Intel/Sharp extended\n");
+ break;
+ case CFI_CMDSET_AMD_STANDARD:
+ printf ("AMD/Fujitsu standard. ");
+#ifdef POLLING_AMD_DQ7
+ printf ("Driver is polling DQ7 for status checking.\n");
+#else
+ printf ("Driver is polling DQ6 for status checking.\n");
+#endif
+ break;
+ case CFI_CMDSET_INTEL_STANDARD:
+ printf ("Intel/Sharp standard\n");
+ break;
+ case CFI_CMDSET_AMD_EXTENDED:
+ printf ("AMD/Fujitsu extended\n");
+#ifdef POLLING_AMD_DQ7
+ printf ("Driver is polling DQ7 for status checking.\n");
+#else
+ printf ("Driver is polling DQ6 for status checking.\n");
+#endif
+ break;
+ case CFI_CMDSET_MITSU_STANDARD:
+ printf ("Mitsubishi standard\n");
+ break;
+ case CFI_CMDSET_MITSU_EXTENDED:
+ printf ("Mitsubishi extendend\n");
+ break;
+ default:
+ printf ("Not defined\n");
+ break;
+ }
+
printf (" Size: %ld MB in %d Sectors\n",
info->size >> 20, info->sector_count);
printf (" Erase timeout %ld ms, write timeout %ld ms, buffer
write timeout %ld ms, buffer size %d\n",
@@ -482,6 +555,9 @@
int aln;
cfiword_t cword;
int i, rc;
+ ulong temp,count;
+
+ count = cnt;
#ifdef CFG_FLASH_USE_BUFFER_WRITE
int buffered_size;
@@ -522,6 +598,8 @@
cnt -= i;
}
#else
+ temp = 0;
+ printf("\n");
while (cnt >= info->portwidth) {
cword.l = 0;
for (i = 0; i < info->portwidth; i++) {
@@ -531,6 +609,10 @@
return rc;
wp += info->portwidth;
cnt -= info->portwidth;
+ if (((count-cnt)>>10)>temp) {
+ temp=(count-cnt)>>10;
+ printf("\r%d KB",temp);
+ }
}
#endif /* CFG_FLASH_USE_BUFFER_WRITE */
if (cnt == 0) {
@@ -568,7 +650,7 @@
flash_write_cmd (info, sector, 0,
FLASH_CMD_PROTECT_CLEAR);
if ((retcode =
- flash_full_status_check (info, sector,
info->erase_blk_tout,
+ flash_full_status_check (info, sector,
0,0,info->erase_blk_tout,
prot ? "protect" : "unprotect"))
== 0) {
info->protect[sector] = prot;
@@ -621,18 +703,22 @@
* flash_is_busy - check to see if the flash is busy
* This routine checks the status of the chip and returns true if the
chip is busy
*/
-static int flash_is_busy (flash_info_t * info, flash_sect_t sect)
+static int flash_is_busy (flash_info_t * info, cfiptr_t cptr, cfiword_t
cword)
{
int retval;
switch (info->vendor) {
case CFI_CMDSET_INTEL_STANDARD:
case CFI_CMDSET_INTEL_EXTENDED:
- retval = !flash_isset (info, sect, 0,
FLASH_STATUS_DONE);
+ retval = !flash_isset (info, cptr, FLASH_STATUS_DONE);
break;
case CFI_CMDSET_AMD_STANDARD:
case CFI_CMDSET_AMD_EXTENDED:
- retval = flash_toggle (info, sect, 0,
AMD_STATUS_TOGGLE);
+#ifdef POLLING_AMD_DQ7
+ retval = Data_Polling_Check (info, cptr, cword);
/* data polling for D7 */
+#else
+ retval = flash_toggle (info, cptr, AMD_STATUS_TOGGLE);
+#endif
break;
default:
retval = 0;
@@ -641,24 +727,109 @@
return retval;
}
+
+/*
----------------------------------------------------------------------
+ * Polling DQ5 for AMD flash
+ * Edited by York Sun (yorksun at freescale.com)
+ */
+static int flash_time_out (flash_info_t * info, cfiptr_t cptr,
cfiword_t cword)
+{
+ int retval;
+
+ switch (info->vendor) {
+ case CFI_CMDSET_AMD_STANDARD:
+ case CFI_CMDSET_AMD_EXTENDED:
+ retval = flash_isset (info, cptr, AMD_STATUS_TIMEOUT);
+ break;
+ default:
+ retval = 0;
+ }
+ debug ("flash_time_out: %d\n", retval);
+ return retval;
+}
+
+/*
----------------------------------------------------------------------
+ * Polling DQ7 for AMD flash
+ * Edited by York Sun (yorksun at freescale.com)
+ */
+static int Data_Polling_Check(flash_info_t * info, cfiptr_t cptr,
cfiword_t cword)
+{
+ uchar read_data=0,polling_data=0;
+
+ switch (info->portwidth) {
+ case FLASH_CFI_8BIT:
+ polling_data= cword.c;
+ break;
+ case FLASH_CFI_16BIT:
+ polling_data=(uchar) (cword.w & 0xff);
+ break;
+ case FLASH_CFI_32BIT:
+ polling_data=(uchar) (cword.l & 0xff);
+ break;
+ case FLASH_CFI_64BIT:
+ polling_data=(uchar) (cword.ll & 0xff);
+ break;
+ default:
+ printf("Error in function %s\n",__FUNCTION__);
+ }
+ do {
+ switch (info->portwidth) {
+ case FLASH_CFI_8BIT:
+ read_data = cptr.cp[0];
+ break;
+ case FLASH_CFI_16BIT:
+ read_data = (uchar) (cptr.wp[0] & 0xff);
+ break;
+ case FLASH_CFI_32BIT:
+ read_data = (uchar) (cptr.lp[0] & 0xff);
+ break;
+ case FLASH_CFI_64BIT:
+ read_data = (uchar) (cptr.llp[0] & 0xff);
+ break;
+ }
+ if ((read_data & AMD_DQ7) == (polling_data & AMD_DQ7))
+ break;
+ } while ((read_data & AMD_DQ5) != (uchar) AMD_DQ5);
+ switch (info->portwidth) {
+ case FLASH_CFI_8BIT:
+ read_data = cptr.cp[0];
+ break;
+ case FLASH_CFI_16BIT:
+ read_data = (uchar) (cptr.wp[0] & 0xff);
+ break;
+ case FLASH_CFI_32BIT:
+ read_data = (uchar) (cptr.lp[0] & 0xff);
+ break;
+ case FLASH_CFI_64BIT:
+ read_data = (uchar) (cptr.llp[0] & 0xff);
+ break;
+ }
+ if ((read_data & AMD_DQ7) != (polling_data & AMD_DQ7))
+ return ERR_TIMOUT;
+ else
+ return ERR_OK;
+}
+
/*----------------------------------------------------------------------
-
* wait for XSR.7 to be set. Time out with an error if it does not.
* This routine does not set the flash to read-array mode.
+ * get_timer does not always work. Polling DQ5 can get the time out
info for AMD flash.
*/
-static int flash_status_check (flash_info_t * info, flash_sect_t
sector,
- ulong tout, char *prompt)
+static int flash_status_check (flash_info_t * info, cfiptr_t cptr,
cfiword_t cword, ulong tout, char *prompt)
{
- ulong start;
+ ulong start,now;
/* Wait for command completion */
- start = get_timer (0);
- while (flash_is_busy (info, sector)) {
- if (get_timer (start) > info->erase_blk_tout * CFG_HZ) {
- printf ("Flash %s timeout at address %lx data
%lx\n",
- prompt, info->start[sector],
- flash_read_long (info, sector, 0));
- flash_write_cmd (info, sector, 0,
info->cmd_reset);
- return ERR_TIMOUT;
+ start = get_timer (0);
+ while (flash_is_busy (info, cptr,cword)) {
+ if ((flash_time_out(info,cptr,cword)) || \
+ ((now=get_timer (start)) > info->erase_blk_tout
* CFG_HZ)) {
+ if (flash_is_busy (info, cptr,cword)) {
+ printf ("Flash %s timeout at address %lx
data %lx\n",\
+ prompt, (ulong)cptr.cp,cword.l);
+ flash_write_cmd (info, 0, 0,
info->cmd_reset);
+ return ERR_TIMOUT;
+ }
}
}
return ERR_OK;
@@ -668,36 +839,34 @@
* Wait for XSR.7 to be set, if it times out print an error, otherwise
do a full status check.
* This routine sets the flash to read-array mode.
*/
-static int flash_full_status_check (flash_info_t * info, flash_sect_t
sector,
- ulong tout, char *prompt)
+static int flash_full_status_check (flash_info_t * info, cfiptr_t cptr,
cfiword_t cword, ulong tout, char *prompt)
{
int retcode;
- retcode = flash_status_check (info, sector, tout, prompt);
+ retcode = flash_status_check (info, cptr, cword, tout, prompt);
switch (info->vendor) {
case CFI_CMDSET_INTEL_EXTENDED:
case CFI_CMDSET_INTEL_STANDARD:
if ((retcode != ERR_OK)
- && !flash_isequal (info, sector, 0,
FLASH_STATUS_DONE)) {
+ && !flash_isequal (info, cptr, FLASH_STATUS_DONE)) {
retcode = ERR_INVAL;
- printf ("Flash %s error at address %lx\n",
prompt,
- info->start[sector]);
- if (flash_isset (info, sector, 0,
FLASH_STATUS_ECLBS | FLASH_STATUS_PSLBS)) {
+ printf ("Flash %s error at address %lx\n",
prompt,(ulong)cptr.cp);
+ if (flash_isset (info, cptr, FLASH_STATUS_ECLBS
| FLASH_STATUS_PSLBS)) {
puts ("Command Sequence Error.\n");
- } else if (flash_isset (info, sector, 0,
FLASH_STATUS_ECLBS)) {
+ } else if (flash_isset (info, cptr,
FLASH_STATUS_ECLBS)) {
puts ("Block Erase Error.\n");
retcode = ERR_NOT_ERASED;
- } else if (flash_isset (info, sector, 0,
FLASH_STATUS_PSLBS)) {
+ } else if (flash_isset (info, cptr,
FLASH_STATUS_PSLBS)) {
puts ("Locking Error\n");
}
- if (flash_isset (info, sector, 0,
FLASH_STATUS_DPS)) {
+ if (flash_isset (info, cptr, FLASH_STATUS_DPS))
{
puts ("Block locked.\n");
retcode = ERR_PROTECTED;
}
- if (flash_isset (info, sector, 0,
FLASH_STATUS_VPENS))
+ if (flash_isset (info, cptr,
FLASH_STATUS_VPENS))
puts ("Vpp Low Error.\n");
}
- flash_write_cmd (info, sector, 0, FLASH_CMD_RESET);
+ flash_write_cmd (info, 0,0, FLASH_CMD_RESET);
break;
default:
break;
@@ -762,9 +931,16 @@
uint stmpi;
#endif
uchar *cp = (uchar *) cmdbuf;
-
- for (i = 0; i < info->portwidth; i++)
- *cp++ = ((i + 1) % info->chipwidth) ? '\0' : cmd;
+ if (info->chipwidth < FLASH_CFI_BY32) {
+ for (i = 0; i < info->portwidth; i++)
+ *cp++ = ((i + 1) % info->chipwidth) ? '\0' :
cmd;
+ }
+ else {
+ ushort *ccp= (ushort *) cmdbuf;
+ ushort cmd_16= cmd + cmd * 256;
+ for (i = 0; i< info->portwidth; i=i+2)
+ *ccp++= ((i + 2) % info->chipwidth) ? '\0'
:cmd_16;
+ }
#if defined(__LITTLE_ENDIAN)
switch (info->portwidth) {
case FLASH_CFI_8BIT:
@@ -797,20 +973,18 @@
flash_make_cmd (info, cmd, &cword);
switch (info->portwidth) {
case FLASH_CFI_8BIT:
- debug ("fwc addr %p cmd %x %x 8bit x %d bit\n", addr.cp,
cmd,
- cword.c, info->chipwidth <<
CFI_FLASH_SHIFT_WIDTH);
+ debug ("fwc issues cmd %x to addr %p with %x,\nassuming
flash port width 8bit, chip width %d bit\n",\
+ cmd, addr.cp, cword.c, info->chipwidth <<
CFI_FLASH_SHIFT_WIDTH);
*addr.cp = cword.c;
break;
case FLASH_CFI_16BIT:
- debug ("fwc addr %p cmd %x %4.4x 16bit x %d bit\n",
addr.wp,
- cmd, cword.w,
- info->chipwidth << CFI_FLASH_SHIFT_WIDTH);
+ debug ("fwc issues cmd %x to addr %p with
%4.4x,\nassuming flash port width 16bit, chip width %d bit\n",\
+ cmd, addr.wp, cword.w, info->chipwidth <<
CFI_FLASH_SHIFT_WIDTH);
*addr.wp = cword.w;
break;
case FLASH_CFI_32BIT:
- debug ("fwc addr %p cmd %x %8.8lx 32bit x %d bit\n",
addr.lp,
- cmd, cword.l,
- info->chipwidth << CFI_FLASH_SHIFT_WIDTH);
+ debug ("fwc issues cmd %x to addr %p with
%8.8lx,\nassuming flash port width 32bit, chip width %d bit\n",\
+ cmd, addr.lp, cword.l, info->chipwidth <<
CFI_FLASH_SHIFT_WIDTH);
*addr.lp = cword.l;
break;
case FLASH_CFI_64BIT:
@@ -820,9 +994,8 @@
print_longlong (str, cword.ll);
- debug ("fwrite addr %p cmd %x %s 64 bit x %d
bit\n",
- addr.llp, cmd, str,
- info->chipwidth <<
CFI_FLASH_SHIFT_WIDTH);
+ debug ("fwrite issues cmd %x to addr %p with
%s,\nassuming flash port width 64 bit, chip width %d bit\n",\
+ cmd, addr.llp, str, info->chipwidth <<
CFI_FLASH_SHIFT_WIDTH);
}
#endif
*addr.llp = cword.ll;
@@ -838,27 +1011,25 @@
/*----------------------------------------------------------------------
-
*/
-static int flash_isequal (flash_info_t * info, flash_sect_t sect, uint
offset, uchar cmd)
+static int flash_isequal (flash_info_t * info, cfiptr_t cptr, uchar
cmd)
{
- cfiptr_t cptr;
cfiword_t cword;
int retval;
- cptr.cp = flash_make_addr (info, sect, offset);
flash_make_cmd (info, cmd, &cword);
- debug ("is= cmd %x(%c) addr %p ", cmd, cmd, cptr.cp);
+ debug ("expecting net value is %x(%c)@addr %p,\n", cmd, cmd,
cptr.cp);
switch (info->portwidth) {
case FLASH_CFI_8BIT:
- debug ("is= %x %x\n", cptr.cp[0], cword.c);
+ debug ("expected read value %x, actual read %x\n",
cword.c,cptr.cp[0]);
retval = (cptr.cp[0] == cword.c);
break;
case FLASH_CFI_16BIT:
- debug ("is= %4.4x %4.4x\n", cptr.wp[0], cword.w);
+ debug ("expected read value %4.4x, actual read %4.4x\n",
cword.w,cptr.wp[0]);
retval = (cptr.wp[0] == cword.w);
break;
case FLASH_CFI_32BIT:
- debug ("is= %8.8lx %8.8lx\n", cptr.lp[0], cword.l);
+ debug ("expected read value %8.8lx, actual read
%8.8lx\n", cword.l,cptr.lp[0]);
retval = (cptr.lp[0] == cword.l);
break;
case FLASH_CFI_64BIT:
@@ -869,7 +1040,7 @@
print_longlong (str1, cptr.llp[0]);
print_longlong (str2, cword.ll);
- debug ("is= %s %s\n", str1, str2);
+ debug ("expected read vaule is %s, actual read
%s\n", str2, str1);
}
#endif
retval = (cptr.llp[0] == cword.ll);
@@ -883,13 +1054,11 @@
/*----------------------------------------------------------------------
-
*/
-static int flash_isset (flash_info_t * info, flash_sect_t sect, uint
offset, uchar cmd)
+static int flash_isset (flash_info_t * info, cfiptr_t cptr, uchar cmd)
{
- cfiptr_t cptr;
cfiword_t cword;
int retval;
- cptr.cp = flash_make_addr (info, sect, offset);
flash_make_cmd (info, cmd, &cword);
switch (info->portwidth) {
case FLASH_CFI_8BIT:
@@ -913,13 +1082,11 @@
/*----------------------------------------------------------------------
-
*/
-static int flash_toggle (flash_info_t * info, flash_sect_t sect, uint
offset, uchar cmd)
+static int flash_toggle (flash_info_t * info, cfiptr_t cptr, uchar cmd)
{
- cfiptr_t cptr;
cfiword_t cword;
int retval;
- cptr.cp = flash_make_addr (info, sect, offset);
flash_make_cmd (info, cmd, &cword);
switch (info->portwidth) {
case FLASH_CFI_8BIT:
@@ -949,6 +1116,7 @@
*/
static int flash_detect_cfi (flash_info_t * info)
{
+ cfiptr_t cptr1,cptr2,cptr3;
debug ("flash detect cfi\n");
for (info->portwidth = FLASH_CFI_8BIT;
@@ -956,11 +1124,14 @@
for (info->chipwidth = FLASH_CFI_BY8;
info->chipwidth <= info->portwidth;
info->chipwidth <<= 1) {
+ cptr1.cp =
flash_make_addr(info,0,FLASH_OFFSET_CFI_RESP);
+ cptr2.cp =
flash_make_addr(info,0,FLASH_OFFSET_CFI_RESP + 1);
+ cptr3.cp =
flash_make_addr(info,0,FLASH_OFFSET_CFI_RESP + 2);
flash_write_cmd (info, 0, 0, FLASH_CMD_RESET);
flash_write_cmd (info, 0, FLASH_OFFSET_CFI,
FLASH_CMD_CFI);
- 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')) {
+ if (flash_isequal (info, cptr1,'Q')
+ && flash_isequal (info, cptr2, 'R')
+ && flash_isequal (info, cptr3, 'Y')) {
info->interface = flash_read_ushort
(info, 0, FLASH_OFFSET_INTERFACE);
debug ("device interface is %d\n",
info->interface);
@@ -992,6 +1163,7 @@
uchar num_erase_regions;
int erase_region_size;
int erase_region_count;
+ cfiptr_t cptr;
info->start[0] = base;
@@ -1044,10 +1216,9 @@
for (j = 0; j < erase_region_count; j++) {
info->start[sect_cnt] = sector;
sector += (erase_region_size *
size_ratio);
+ cptr.cp =
flash_make_addr(info,sect_cnt,FLASH_OFFSET_PROTECT);
info->protect[sect_cnt] =
- flash_isset (info, sect_cnt,
-
FLASH_OFFSET_PROTECT,
-
FLASH_STATUS_PROTECT);
+ flash_isset (info,
cptr,FLASH_STATUS_PROTECT);
sect_cnt++;
}
}
@@ -1081,7 +1252,7 @@
cfiptr_t ctladdr;
cfiptr_t cptr;
- int flag;
+ int flag,retcode;
ctladdr.cp = flash_make_addr (info, 0, 0);
cptr.cp = (uchar *) dest;
@@ -1142,7 +1313,8 @@
if (flag)
enable_interrupts ();
- return flash_full_status_check (info, 0, info->write_tout,
"write");
+ retcode = flash_full_status_check (info, cptr, cword,
info->write_tout, "write");
+ return flag;
}
#ifdef CFG_FLASH_USE_BUFFER_WRITE
@@ -1181,7 +1353,7 @@
flash_write_cmd (info, sector, 0, FLASH_CMD_CLEAR_STATUS);
flash_write_cmd (info, sector, 0, FLASH_CMD_WRITE_TO_BUFFER);
if ((retcode =
- flash_status_check (info, sector, info->buffer_write_tout,
+ flash_status_check (info, sector,
0,0,info->buffer_write_tout,
"write to buffer")) == ERR_OK) {
/* reduce the number of loops by the width of the port
*/
switch (info->portwidth) {
@@ -1224,7 +1396,7 @@
flash_write_cmd (info, sector, 0,
FLASH_CMD_WRITE_BUFFER_CONFIRM);
retcode =
- flash_full_status_check (info, sector,
+ flash_full_status_check (info, sector,0,0,
info->buffer_write_tout,
"buffer write");
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-10-27 21:10 York Sun
@ 2004-11-22 17:46 ` Jon Loeliger
2004-11-22 18:57 ` York Sun
0 siblings, 1 reply; 16+ messages in thread
From: Jon Loeliger @ 2004-11-22 17:46 UTC (permalink / raw)
To: u-boot
On Wed, 2004-10-27 at 16:10, York Sun wrote:
> Here is the patch.
>
> Regards,
>
> York
>
>
> --- u-boot-pq3-base/drivers/cfi_flash.c 2004-08-06 13:08:19.000000000
> -0500
> +++ u-boot-pq3-for-release/drivers/cfi_flash.c 2004-10-27
> 16:02:34.028749216 -0500
> @@ -10,6 +10,11 @@
> * Ed Okerson
> * Modified to work with little-endian systems.
> *
> + * Copyright (C) 2004
> + * York Sun
> + * Modified to support 8-bit port and 32-bit chip, not verified
> + * Modified to support polling DQ7 and DQ6 for AMD flash
> + *
> * See file CREDITS for list of people who contributed to this
> * project.
> *
York,
I tried to apply this version of your patch and was unable to
have it patch properly due to mailer wrapping and munging.
Privately, you sent me an updated version of this patch that
worked well on my MPC8540/60ADS and MPC8555/41CDS systems.
Could you please repost that patch to the list here in a form
that won't be munged by mailer MUAs? If you do, please state
thta it _replaces_ this version of the patch. Also, please
include the required CHANGELOG entry for it!
Thanks!
jdl
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-11-22 17:46 ` Jon Loeliger
@ 2004-11-22 18:57 ` York Sun
2004-11-29 19:58 ` Jon Loeliger
0 siblings, 1 reply; 16+ messages in thread
From: York Sun @ 2004-11-22 18:57 UTC (permalink / raw)
To: u-boot
Jon,
On Mon, 2004-11-22 at 11:46, Jon Loeliger wrote:
> I tried to apply this version of your patch and was unable to
> have it patch properly due to mailer wrapping and munging.
>
> Privately, you sent me an updated version of this patch that
> worked well on my MPC8540/60ADS and MPC8555/41CDS systems.
>
> Could you please repost that patch to the list here in a form
> that won't be munged by mailer MUAs? If you do, please state
> thta it _replaces_ this version of the patch. Also, please
> include the required CHANGELOG entry for it!
I have reposted the patch on Nov 1. Please check the archived mails.
Which CHANGELOG should I change? Some comments has been added to show
the changes.
Regards,
York
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-11-22 18:57 ` York Sun
@ 2004-11-29 19:58 ` Jon Loeliger
2004-11-29 21:06 ` Wolfgang Denk
0 siblings, 1 reply; 16+ messages in thread
From: Jon Loeliger @ 2004-11-29 19:58 UTC (permalink / raw)
To: u-boot
On Mon, 2004-11-22 at 12:57, York Sun wrote:
> > Could you please repost that patch to the list here in a form
> > that won't be munged by mailer MUAs? If you do, please state
> > thta it _replaces_ this version of the patch. Also, please
> > include the required CHANGELOG entry for it!
>
> I have reposted the patch on Nov 1. Please check the archived mails.
I searched the archives but was unable to find a clean
version of the patch that was not munged by a mailer.
(Ref: From: York Sun <ysun@me...> RE: CFI driver 2004-10-27 14:25)
> Which CHANGELOG should I change? Some comments has been added to show
> the changes.
Wolfgang requires a CHANGELOG entry that he can add
to the master CHANGELOG file for submitted patches.
This is NOT the same as comments within the code itself.
> Regards,
>
> York
Thanks,
jdl
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2004-11-29 19:58 ` Jon Loeliger
@ 2004-11-29 21:06 ` Wolfgang Denk
0 siblings, 0 replies; 16+ messages in thread
From: Wolfgang Denk @ 2004-11-29 21:06 UTC (permalink / raw)
To: u-boot
In message <1101758313.15446.55.camel@cashmere.sps.mot.com> you wrote:
> On Mon, 2004-11-22 at 12:57, York Sun wrote:
...
> > I have reposted the patch on Nov 1. Please check the archived mails.
>
> I searched the archives but was unable to find a clean
> version of the patch that was not munged by a mailer.
The patch posted on Nov 1 is indeed not munged by a mailer.
Nevertheless, it does not satisfy the requirements for a patch;
especially it adds lots of trailing white space; it does not use TABs
for indentation, etc.
> Wolfgang requires a CHANGELOG entry that he can add
> to the master CHANGELOG file for submitted patches.
> This is NOT the same as comments within the code itself.
Indeed.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Vulcans do not approve of violence.
-- Spock, "Journey to Babel", stardate 3842.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
@ 2005-04-03 20:47 Wolfgang Denk
2005-04-04 17:39 ` Jon Loeliger
0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Denk @ 2005-04-03 20:47 UTC (permalink / raw)
To: u-boot
In message <1B848D3797CA9841B0A46694F055A67A02FBBA86@MW-AUS02.mtwk.sps.mot.com> you wrote:
> Here is the patch.
...
> --- u-boot-pq3-base/drivers/cfi_flash.c 2004-08-06 13:08:19.000000000
> -0500
> +++ u-boot-pq3-for-release/drivers/cfi_flash.c 2004-10-27
> 16:02:34.028749216 -0500
> @@ -10,6 +10,11 @@
> * Ed Okerson
> * Modified to work with little-endian systems.
> *
> + * Copyright (C) 2004
> + * York Sun
> + * Modified to support 8-bit port and 32-bit chip, not verified
> + * Modified to support polling DQ7 and DQ6 for AMD flash
> + *
The patch was corrupted by your mailer; I restored it. Nevetheless,
there were a few problems with some boards -- I guess you didn't
bother to run the "MAKEALL" script, did you?
I tried to fix the problems, but you should have a look at my changes
and re-test.
My own tests are not so positive - I got a "Timeout writing to Flash"
error on the first board I tried (which was working fine before
applying the patch).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
O Staat! Wie tief dir alle Besten fluchen! Du bist kein Ziel. Der
Mensch mu? weiter suchen. - Christian Morgenstern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.gz
Type: application/x-gzip
Size: 6936 bytes
Desc: patch.gz
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050403/53d513f6/attachment.bin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot-Users] CFI driver
2005-04-03 20:47 Wolfgang Denk
@ 2005-04-04 17:39 ` Jon Loeliger
0 siblings, 0 replies; 16+ messages in thread
From: Jon Loeliger @ 2005-04-04 17:39 UTC (permalink / raw)
To: u-boot
On Sun, 2005-04-03 at 15:47, Wolfgang Denk wrote:
> In message <1B848D3797CA9841B0A46694F055A67A02FBBA86@MW-AUS02.mtwk.sps.mot.com> you wrote:
> > Here is the patch.
> ...
> > --- u-boot-pq3-base/drivers/cfi_flash.c 2004-08-06 13:08:19.000000000
> > -0500
> > +++ u-boot-pq3-for-release/drivers/cfi_flash.c 2004-10-27
> > 16:02:34.028749216 -0500
> > @@ -10,6 +10,11 @@
> > * Ed Okerson
> > * Modified to work with little-endian systems.
> > *
> > + * Copyright (C) 2004
> > + * York Sun
> > + * Modified to support 8-bit port and 32-bit chip, not verified
> > + * Modified to support polling DQ7 and DQ6 for AMD flash
> > + *
>
> The patch was corrupted by your mailer; I restored it. Nevetheless,
> there were a few problems with some boards -- I guess you didn't
> bother to run the "MAKEALL" script, did you?
True. And I've been bugging folks locally to fix it too... :-)
> I tried to fix the problems, but you should have a look at my changes
> and re-test.
>
> My own tests are not so positive - I got a "Timeout writing to Flash"
> error on the first board I tried (which was working fine before
> applying the patch).
Wolfgang,
There was a follow-up bug fix that might be important here.
It fixes the problem with the retcode/flag typo here:
@@ -1176,7 +1402,8 @@
if (flag)
enable_interrupts ();
- return flash_full_status_check (info, 0,
info->write_tout, "write");
+ retcode = flash_full_status_check (info, cptr, cword,
info->write_tout, "write");
+ return flag;
Should return "retcode" now, not "flag".
Thanks,
jdl
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2005-04-04 17:39 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 19:26 [U-Boot-Users] CFI driver York Sun
2004-10-20 19:59 ` Yuli Barcohen
2004-10-20 20:19 ` Yuli Barcohen
2004-10-20 20:40 ` York Sun
2004-10-20 21:21 ` York Sun
[not found] ` <16759.40840.186219.754326@astp0002.localdomain>
[not found] ` <1098369141.4502.18.camel@localhost.localdomain>
[not found] ` <16765.12175.401464.214322@astp0002.localdomain>
2004-10-27 19:55 ` York Sun
2004-10-27 20:37 ` Wolfgang Denk
[not found] <E1CKMIE-00085P-Dl@sc8-sf-list1.sourceforge.net>
2004-10-21 3:06 ` Sam Song
2004-10-21 3:08 ` Sam Song
-- strict thread matches above, loose matches on Subject: below --
2004-10-27 21:10 York Sun
2004-11-22 17:46 ` Jon Loeliger
2004-11-22 18:57 ` York Sun
2004-11-29 19:58 ` Jon Loeliger
2004-11-29 21:06 ` Wolfgang Denk
2005-04-03 20:47 Wolfgang Denk
2005-04-04 17:39 ` Jon Loeliger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox