This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
strata flash - byte mode support
- To: ecos-discuss at sources dot redhat dot com
- Subject: [ECOS] strata flash - byte mode support
- From: jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>
- Date: Tue, 17 Jul 2001 17:46:17 +0200
- Organization: ACUNIA
Hi,
Following patch fixes ecos' strata flash support when in 'byte mode'.
(x8 mode)
Greetings,
Jeroen Dobbelaere
http://www.acunia.com
diff -cNr ecos_original/packages/devs/flash/intel/strata/current/ChangeLog ecos/packages/devs/flash/intel/strata/current/ChangeLog
*** ecos_original/packages/devs/flash/intel/strata/current/ChangeLog Fri Jun 22 20:18:47 2001
--- ecos/packages/devs/flash/intel/strata/current/ChangeLog Tue Jul 17 17:12:24 2001
***************
*** 1,3 ****
--- 1,12 ----
+ 2001-07-17 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
+
+ * src/flash_query.c (flash_query): Query needs to be done on even
+ addresses for byte-enabled strata flash
+
+ * src/flash_program_buf.c (flash_program_buf): Fix of conversion of
+ write buffer length (in bytes) to the length in 'flash_t' words.
+
+
2001-06-22 Hugo Tyson <hmt@redhat.com>
* src/strata.c (flash_hwr_init): Need to refer to the query code
diff -cNr ecos_original/packages/devs/flash/intel/strata/current/src/flash_program_buf.c ecos/packages/devs/flash/intel/strata/current/src/flash_program_buf.c
*** ecos_original/packages/devs/flash/intel/strata/current/src/flash_program_buf.c Fri Jun 22 20:18:47 2001
--- ecos/packages/devs/flash/intel/strata/current/src/flash_program_buf.c Tue Jul 17 17:09:54 2001
***************
*** 85,91 ****
wc = buffer_size;
if (wc > len) wc = len;
len -= wc;
! wc = wc / (CYGNUM_FLASH_DEVICES*2); // Word count
*BA = FLASH_Write_Buffer;
timeout = 5000000;
while(((stat = ROM[0]) & FLASH_Status_Ready) != FLASH_Status_Ready) {
--- 85,92 ----
wc = buffer_size;
if (wc > len) wc = len;
len -= wc;
! // convert 'wc' in bytes to 'wc' in 'flash_t'
! wc = wc / sizeof(flash_t); // Word count
*BA = FLASH_Write_Buffer;
timeout = 5000000;
while(((stat = ROM[0]) & FLASH_Status_Ready) != FLASH_Status_Ready) {
diff -cNr ecos_original/packages/devs/flash/intel/strata/current/src/flash_query.c ecos/packages/devs/flash/intel/strata/current/src/flash_query.c
*** ecos_original/packages/devs/flash/intel/strata/current/src/flash_query.c Fri Apr 6 19:20:18 2001
--- ecos/packages/devs/flash/intel/strata/current/src/flash_query.c Tue Jul 17 17:06:07 2001
***************
*** 86,91 ****
--- 86,98 ----
// It is very deliberate that data is chars NOT flash_t:
// The info comes out in bytes regardless of device.
*data++ = (unsigned char) (*ROM++);
+ #ifndef CYGOPT_FLASH_IS_BOOTBLOCK
+ # if 8 == CYGNUM_FLASH_WIDTH
+ // strata flash with 'byte-enable' contains the configuration data
+ // at even addresses
+ ++ROM;
+ # endif
+ #endif
}
ROM[0] = FLASH_Reset;