public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* STRATA v2 buffered programming fix
@ 2009-10-16  8:34 Edgar Grimberg
  2009-10-16 14:50 ` Bart Veer
  0 siblings, 1 reply; 5+ messages in thread
From: Edgar Grimberg @ 2009-10-16  8:34 UTC (permalink / raw)
  To: ecos-patches

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

Hi,

The attached patch makes the STRATA buffered programming algorithm
write the word count to the flash.
Also, it fixes a compilation issue in the diagnostics output.

Regards,
Edgar

-- 
Edgar Grimberg
System Developer
Zylin AS
ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00

[-- Attachment #2: strata_v2_patch.txt --]
[-- Type: text/plain, Size: 1698 bytes --]

Index: current/src/strata_aux.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/src/strata_aux.c,v
retrieving revision 1.2
diff -u -r1.2 strata_aux.c
--- current/src/strata_aux.c	29 Jan 2009 17:48:27 -0000	1.2
+++ current/src/strata_aux.c	16 Oct 2009 08:27:26 -0000
@@ -234,7 +234,7 @@
     int             result  = CYG_FLASH_ERR_OK;
     int             retries;
 
-    sf_diag("addr %08x fc %d\n",addr, first_call);
+    sf_diag("addr %08x \n",addr);
     // Start the erase operation
     addr[0] = STRATA_COMMAND_CLEAR_STATUS;
     addr[0] = STRATA_COMMAND_ERASE;
@@ -350,7 +350,7 @@
     } while ((--retries > 0) && ((status & STRATA_STATUS_SR7) != STRATA_STATUS_SR7));
     
     // Now issue the count, data, and confirm the operation
-    addr[0]   = STRATA_SWAP(STRATA_PARALLEL((count - 1)));
+    addr[0]   = STRATA_SWAP(STRATA_PARALLEL(count));
     for( i = 0 ; i < count ; i++ )    
     {
         STRATA_TYPE val = STRATA_NEXT_DATUM(buf);
Index: current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/ChangeLog,v
retrieving revision 1.7
diff -u -r1.7 ChangeLog
--- current/ChangeLog	21 Apr 2009 15:40:08 -0000	1.7
+++ current/ChangeLog	16 Oct 2009 08:27:26 -0000
@@ -1,3 +1,9 @@
+2009-10-16  Edgar Grimberg  <edgar.grimberg@zylin.com>
+
+	* src/strata_aux.c: Modified the word count to be written on the 
+	flash to match the number of words. 
+	Fixed the diagnostic output. 
+
 2009-04-21  Bart Veer  <bartv@ecoscentric.com>
 
 	* src/strata.c: Added set of parentheses around macro parameters

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-10-19 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-16  8:34 STRATA v2 buffered programming fix Edgar Grimberg
2009-10-16 14:50 ` Bart Veer
2009-10-16 15:09   ` Edgar Grimberg
2009-10-16 17:01     ` Kurt Siedenburg
2009-10-19 11:05       ` Edgar Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).