2008-11-23  Sergei Gavrikov  <sergei.gavrikov@gmail.com>

	* doc/strata.sgml: Fix cut'n'paste typo in example: amd->strata.

2008-11-20  Jonathan Larmour  <jifl@eCosCentric.com>

	* cdl/flash_strata_v2.cdl: Fix doc link.

2008-11-13  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/flash_strata_v2.inl:
	* include/strata_v2_priv.h:
	Remove these as they are now unused and don't match the CDL.

2006-08-08  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/strata.c: Provide a default HAL_MEMORY_BARRIER()
	define if the HAL hasn't provided one.
	* src/strata_aux.c: Use HAL_MEMORY_BARRIER() any time the
	flash is switched back to read array mode. Some processors need
	to have their write buffers flushed.

2006-08-02  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/strata_dev.h: Replace use of flash_priv.h by flash_dev.h
	as per io/flash changes.
	* src/strata.c: Ditto.

2006-07-31  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/strata.c: Remove strata-specific nop devfn functions now
	provided by io/flash. Also strata_anonymizer.
	* src/strata_aux.c: Change strata_anonymizer to cyg_flash_anonymizer.

	* doc/strata.sgml: Update to reflect generic nop devfn functions
	now provided by io/flash.

2006-05-15  John Dallaway  <jld@ecoscentric.com>

	* cdl/flash_strata_v2.cdl: Add reference to package documentation.

2006-04-09  Bart Veer  <bartv@ecoscentric.com>

	* src/strata_aux.c (strata_hw_bufprogram): re-read status after
	the loop, the bits may not all change at the same time.

2006-03-31  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/strata_aux.c (strata_hw_erase): Workaround for
	ST M58XXXX doesn't work for parallel flash. Another
	hack put in place instead so it works not just for
	parallel flash in general, but also parallel ST M58XXXX
	should that ever be used in future.
	(strata_hw_bufprogram): count of bytes to write has to
	be STRATA_PARALLELed to affect all parallel devices.

2006-03-29  Nick Garnett  <nickg@ecoscentric.com>

	* src/strata_aux.c (cyg_strata_program): Fixed bug in
	increments/decrements during main loop to match those in
	bufprogram.
	Modified diagnostic output a little.

2006-01-24  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/strata.c (STRATA_OFFSET_CFI_WRITE_BUFFER_LSB): Add definition
	of CFI offset. Ditto _MSB.

	* src/strata_aux.c (strata_hw_cfi): Detect writebuffer size.

2005-11-28  Nick Garnett  <nickg@ecoscentric.com>

	* src/strata_aux.c: Added support for byte swapping the command
	and status reads and writes. Fixed some pointer increment bugs.
	Added some diagnostic macros.

	* src/strata.c: Added byte swapping support.
	
2005-08-03  Jonathan Larmour  <jifl@eCosCentric.com>
2005-08-03  Bart Veer  <bartv@eCosCentric.com>

	* src/strata.c (STRATA_INTSCACHE_DEFAULT_END): In the
	case of !defined(CYGHWR_DEVS_FLASH_STRATA_V2_CACHED_ONLY) and
	!defined(CYGIMP_DEVS_FLASH_STRATA_V2_LEAVE_INTERRUPTS_ENABLED)
	briefly blip the interrupt enable on to allow pending interrupts
	to run, thus reducing max interrupt latency.

2005-08-02  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/strata.c (STRATA_INTSCACHE_DEFAULT_END): Even when
	!defined(CYGHWR_DEVS_FLASH_STRATA_V2_CACHED_ONLY) we need to
	remove stale dcache entries for the Flash before finishing
	the whole operation. So invalidate (and therefore also sync)
	the dcache.

	* src/strata_aux.c (cyg_strata_lock_j3): Allow building with
	assertions enabled (CYGPKG_INFRA_DEBUG).
	(cyg_strata_unlock_all_j3): Ditto.
	(cyg_strata_lock_k3): Ditto.
	(cyg_strata_unlock_k3): Ditto.	

2005-07-25  Bart Veer  <bartv@ecoscentric.com>

	* cdl/flash_strata_v2.cdl: add configury for finer control of the
	  cache and interrupts.
	* src/strata.c: STRATA_P2V() renamed to STRATA_UNCACHED_ADDRESS(),
	  a more appropriate name. Provide three versions of the INTSCACHE()
	  macros for different configurations.
        * src/strata_aux.c: use STRATA_UNCACHED_ADDRESS() throughout.
	  Sort out the assertions properly. Reorganize status bit checks
	  and add comment re. discrepancy with datasheets.
	* include/strata_dev.h, src_strata_aux.c: unlock_all_j3 now takes
	  a cyg_flashaddr_t instead of a device pointer, for compatibility
	  with the main flash API. 

2005-06-16  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/strata_aux.c (strata_hw_erase): Order detection of errors
	correctly, so most appropriate error codes get returned first.
	(strata_hw_program): Ditto.
	(strata_hw_bufprogram): Ditto.
	(strata_hw_lock_j3): Ditto. Also remove duplicate resetting to
	read array.
	(strata_hw_unlock_all_j3): Ditto.
	(cyg_strata_program): Place assertion check correctly.
	(cyg_strata_bufprogram): Ditto.
	(cyg_strata_lock_j3): Ditto.
	(cyg_strata_lock_k3): Ditto.
	(cyg_strata_unlock_k3): Ditto.

2005-06-16  Bart Veer  <bartv@eCosCentric.com>

	* src/strata_aux.c (strata_hw_bufprogram): Write the correct
	number of bytes. Confirm write at correct address.
	(cyg_strata_bufprogram): update "written" correctly.

2005-06-11  Bart Veer  <bartv@ecoscentric.com>

	* cdl/flash_strata_v2.cdl, include/strata_dev.h, src/strata.c,
	src/strata_aux.c, doc/strata.sgml: new version of the V2 strata
	driver based on the am29xxxxxv2 driver, interrupt and cache safe.

2004-11-29  Bart Veer  <bartv@ecoscentric.com>

	* include/flash_strata_v2.inl: hwr_map_error() is now internal to
	the driver, not exported to the generic flash code.
	
	* include/flash_strata_v2.inl: use the dummy lock/unlock functions
	provided by the generic flash code.

2004-11-25  Andrew Lunn  <andrew.lunn@ascom.ch>

	* include/flash_strata_v2.inl: Correct the usage of const
	parameters. strata_init() needs to be able to modify priv.
	strata_program_buf() does not need to modify priv.

2004-11-25  Bart Veer  <bartv@ecoscentric.com>

	* cdl/flash_strata_v2.cdl: this V2 driver relies on the generic
	flash code to handle the cache

2004-11-22  Bart Veer  <bartv@ecoscentric.com>

	* include/flash_strata_v2.inl: adjust const parameters as per
	change to generic flash package
	* include/flash_strata_v2.inl: rename cyg_block_info to
	cyg_flash_block_info

2004-11-21  Bart Veer  <bartv@ecoscentric.com>

	* cdl/flash_strata_v2.cdl: CYGHWR_IO_FLASH_DEVICE_V2 is now
	implicit

2004-09-14  Andrew Lunn  <andrew.lunn@ascom.ch>

	* include/flash_strata_v2.inl: Return the end address which is the
	last valid address, not the first invalid address.
	Also import Mark Salters changes from the trunk.
	
2004-08-21  Andrew Lunn  <andrew.lunn@ascom.ch>
	
	* include/flash_strata_v2.inl (flash_unlock_block): 
	* cdl/flash_strata_v2.cdl: CDL to control the maximum number of
	blocks the driver supports. Some of the newer strata device has more
	than the default maximum of 128. Problem pointed out by Kevin Zhang.

2004-08-13  Andrew Lunn  <andrew.lunn@ascom.ch>

	* cdl/flash_strata_v2.cdl: Indicate we implement
	CYGHWR_IO_FLASH_BLOCK_LOCKING when
	CYGOPT_DEVS_FLASH_STRATA_V2_LOCKING is enabled.
	* include/flash_strata_v2.inl: Make block unlock and 
	lock compile.
	
2004-08-05  Andrew Lunn  <andrew.lunn@ascom.ch>

	* New version of the strata driver based on the old version. This
	version uses the new flash device API.

2005-01-26  Scott Wilkinson <scott@alliantnetworks.com>
	* src/strata.h:
	* src/strata.c:
	Flash from STMicro is compatible with the Intel strata chips, 
	so detect them as well.  Check for manuf id 0x20.

2003-10-29  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/flash_unlock_block.c (flash_unlock_block): test lock bit
	explicitly - newer flash parts use the reserved bits in the
	returned data.

2003-09-11  Jani Monoses <jani@iv.ro>

	* src/flash_erase_block.c (flash_erase_block): 
	* src/flash_program_buf.c (flash_program_buf): Fix bootblock handling
	in erase. Fix erase and word-program for Synchronous Strata and later
	chips where block address and word address are required in the first
	cycle of the operation while for earlier parts any address was good.
	
2003-09-10  Jani Monoses <jani@iv.ro>
	
	* cdl/flash_strata.cdl:
	* src/flash_lock_block.c (flash_lock_block): 
	* src/flash_unlock_block.c (flash_unlock_block): 
	* src/flash_erase_block.c (flash_erase_block): 
	* src/flash_query.c (flash_query): 
	* src/flash_program_buf.c (flash_program_buf): Use .2ram sections 
	for putting flash functions to RAM instead of the old method.
	
2003-05-02  Jani Monoses <jani@iv.ro>

	* src/strata.c: Switch to using generic flash_query_dev.
	The previous cache related changes broke flash_query for
	Strata because in the query case the generic flash driver was not
	called to handle the caches but the internal handling was removed
	nevertheless.
	
2003-04-04  Jani Monoses <jani@iv.ro>
	
	* src/strata.h:
	Use generic flash_dev.h for providing the FLASHWORD macro for
	different widths and device numbers.No reason to duplicate that
	here.This implicitely fixes the case when CYGNUM_FLASH_WIDTH is 16
	and CYGNUM_FLASH_DEVICES is 4.

2003-04-03  Jani Monoses <jani@iv.ro>

	* src/flash_lock_block.c (flash_lock_block): 
	* src/flash_unlock_block.c (flash_unlock_block): 
	* src/flash_erase_block.c (flash_erase_block): 
	* src/flash_query.c (flash_query): 
	* src/flash_program_buf.c (flash_program_buf): 
	Cache enabling and disabling are already handled by generic flash
	
2002-08-12  Mark Salter  <msalter@redhat.com>

	* src/flash_unlock_block.c: Add synchronous strataflash support.
	* src/strata.h: Add comments regarding synchronous strataflash.

2002-04-30  Christoph Csebits  <christoph.csebits@frequentis.com>

	* src/flash_unlock_block.c: Getting the current block lock
	state for flashes in 8-Bit mode is now working correctly.

2002-04-16  Jonathan Larmour  <jlarmour@redhat.com>

	* cdl/flash_strata.cdl: Invoke $(CC) with $(CFLAGS) to ensure the
        correct flags are passed.

2002-04-12  Gary Thomas  <gthomas@redhat.com>

	* src/strata.c: Clean up warnings.

2002-01-22  Mark Salter  <msalter@redhat.com>

	* cdl/flash_strata.cdl: Add ".text" before "_end" markers in .s files.

2001-10-23  Hugo Tyson  <hmt@redhat.com>

	* cdl/flash_strata.cdl: Provide an option so that RedBoot .ecm
	files can turn off the functionality of copying flash driver code
	to separate RAM for execution; it's not needed for RAM and ROMRAM
	startup, and for some platforms it is required to *not* copy thus.

2001-08-25  Gary Thomas  <gthomas@redhat.com>

	* src/flash_program_buf.c (flash_program_buf): Allow configuration
	specific code sequence for actual writing of data.  Define by the
	macro CYGHWR_FLASH_WRITE_ELEM.  Note: this is required on some
	hardware, like the Intel SA185, which handles flash writes in
	strange/obscure fashion.

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
	as extern char flash_query[], flash_query_end[]; (with the []) or
	MIPS code gen assumes these are short offsets and linking fails.
	The generic flash code in io/flash already uses this idiom.

2001-06-22  Hugo Tyson  <hmt@redhat.com>

	* src/strata.c (flash_hwr_init): Warnings reduced.  No arithmetic
	on void *.

2001-06-21  Hugo Tyson  <hmt@redhat.com>

	* src/flash_program_buf.c (flash_program_buf): The buffered write
	code didn't jump out if there was a write error, nor verify the
	data by reading back.  This isn't consistent with the slow case,
	and made it take an age if the device is unhappy, and then report
	a bizarre error code.  Both issues fixed.

2001-06-21  Hugo Tyson  <hmt@redhat.com>

	* src/strata.c (flash_hwr_init): If shrinking to fit, must also
	adjust the flash_info.blocks field, else unlock crashes trying to
	get status of all those extra blocks that we cannot actually see.

2001-06-11  Gary Thomas  <gthomas@redhat.com>

	* src/strata.c: Remove dependency on printf() via user functions.

2001-06-07  Hugo Tyson  <hmt@redhat.com>

	* src/strata.c (flash_hwr_init): If we find a flash device that is
	larger than is possible given the memory map, shrink to fit.
	We know about the memory map from CYGNUM_FLASH_BASE_MASK (if
	defined); it tells us the stride from one device to another.

	This is to cope with installing, say, a 28F640 in a slot designed
	for a 28F320 because of supply issues - it all works fine so long
	as A22 is grounded.

2001-05-23  Jesper Skov  <jskov@redhat.com>

	* cdl/flash_strata.cdl: Needs IO driver to copy functions to RAM.

2001-04-26  Gary Thomas  <gthomas@redhat.com>

	* src/strata.c: Be more careful when enable/flush/disable caches.

	* src/flash_erase_block.c (flash_erase_block): Boot block devices
	may require additional erase commands to erase entire 'block'.

2001-03-21  Hugo Tyson  <hmt@redhat.com>

	* src/strata.h (FLASH_Write_Buffer): Do not define this if
	CYGOPT_FLASH_IS_NOT_ADVANCED is defined; Advanced (xxxJ3) flash is
	usual these days.  Also added documentation of the options that
	can be used to control this module.
	
	* src/flash_program_buf.c (flash_program_buf): Reduce warnings
	about unused variables if no FLASH_Write_Buffer command available.

2001-03-21  Gary Thomas  <gthomas@redhat.com>

	* src/flash_program_buf.c (flash_program_buf): Buffered write code
	fixups, only on platforms with it defined.

2001-03-17  Gary Thomas  <gthomas@redhat.com>

	* src/strata.h: 
	* src/strata.c: Support buffered writes.

	* src/flash_program_buf.c: Use buffered writes if possible. This
	mode allows the chip to do parallelized writes which is much faster.
	It does require additional information, now provided by upper layer.

2001-02-15  Hugo Tyson  <hmt@redhat.com>

	* src/flash_query.c (flash_query): Depending on whether
	CYGOPT_FLASH_IS_BOOTBLOCK (just a #define from the instantiator,
	not really a cdl_option) is set, do the full Read_Query or just
	acquire two codes for manufacturer and device type using Read_ID.

	* src/strata.c (flash_hwr_init): Again depending on whether
	CYGOPT_FLASH_IS_BOOTBLOCK, decode the device type into a size and
	so on, or use the full Read_Query data as before.

	* src/strata.h (FLASH_Read_ID): Undefine those commands which we
	do not use.  Conditionally define those that we use depending on
	CYGOPT_FLASH_IS_BOOTBLOCK.  Thus we should be able to deal with
	StrataFlash and BootBlock flash with the same code.

	* cdl/flash_strata.cdl: Do not implement (in the CDL sense)
	CYGHWR_IO_FLASH_BLOCK_LOCKING leave it up to the instantiating
	package instead.  Also move the build of the two objects that do
	locking and unlocking into a compenent which is only active if
	CYGHWR_IO_FLASH_BLOCK_LOCKING is indeed (requested to be)
	implemented somewhere.

2001-02-14  Hugo Tyson  <hmt@redhat.com>

	* devs/flash/intel/strata/...: New package, generic strataFlash
	driver based on several others; a portion of its history
	follows...

	flash.h -> strata.h
	flash<platform>.c -> strata.c

2001-02-06  Hugo Tyson  <hmt@redhat.com>

	* src/flash.h: Much more generic again.  Not yet separated into
	generic component and invocation header, but the structure is
	there.  Also included support for a mapping from the physical
	flash address we're thinking of to the virtual address we use to
	access it.  More documentation.  Generalization to 8,16,32 and
	64-bit access, made up from 8,16 or 32-bit devices.  Command and
	status macros modified to accommodate these options.

	* src/flash_lock_block.c (flash_lock_block): 
	* src/flash_erase_block.c (flash_erase_block): 
	* src/flash_query.c (flash_query): 
	* src/flash_program_buf.c (flash_program_buf): 
	All now acquire when possible the ROM address from the block
	address, and use the physical to virtual macro as needed.

	* src/flash_unlock_block.c (flash_unlock_block): 
	The same changes, but a little more complex because of the need to
	clear-all then re-lock some semantics.  Shadow pointer to virtual
	address is used each time round the loop.

	* cdl/flash_strata.cdl: Add explicit dependencies on flash.h, for
	there were none - or they were ignored - for the specially built
	compilation units that get copied to RAM for execution.

2001-02-01  Hugo Tyson  <hmt@redhat.com>

	* all: copied from the assabet flash driver.

2000-12-05  Jonathan Larmour  <jlarmour@redhat.com>

	* src/assabet_flash.c (flash_code_overlaps): Define stext/etext
	as array types so no assumptions can be made by the compiler about
	location.

2000-10-24  Gary Thomas  <gthomas@redhat.com>

	* src/flash_unlock_block.c (flash_unlock_block): 
	* src/flash_lock_block.c (flash_lock_block): 
	* src/flash_program_buf.c (flash_program_buf): 
	* src/flash_erase_block.c (flash_erase_block): Support up to 32M FLASH.

2000-09-10  Gary Thomas  <gthomas@redhat.com>

	* src/flash_unlock_block.c: 
	* src/flash_lock_block.c: New file(s).

	* src/flash.h: 
	* cdl/flash_assabet.cdl: Add region locking functions.

2000-08-29  Gary Thomas  <gthomas@redhat.com>

	* src/assabet_flash.c: Improve error decoding.

2000-08-24  Gary Thomas  <gthomas@redhat.com>

	* src/flash_query.c: 
	* src/flash_erase_block.c: 
	* src/flash.h: FLASH support for Intel SA1110 Assabet.

//===========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
// Copyright (C) 2004, 2005, 2006 eCosCentric Limited
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
//
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//===========================================================================
