2009-03-12  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Fix ifdef nesting messed up by merges from
	anoncvs. The checkin also got it wrong.

2009-03-05  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Fix missing #endif. 

2008-11-03  Gabor Toeroek <tgabor84@gmail.com>

	* include/var_io.h: Added defines for AT91SAM7SE.

2008-10-19  Igor B. Poretsky <poretsky@mlbox.ru>

	* include/var_io.h Fixed various typos.

2008-09-02  John Eigelaar: <jeigelaar@mweb.co.za>
 
 	* include/var_io.h: Added support for a second flash controller.
	Fixed some cut and paste gremlins in the SSC definitions.
	Changed decimal definitions in TWI that could have been confused with 
	octal definitions.
	Added ADC definitions for the TRGEN bit and the PDC control bits.
	   

2008-07-12  Andrew Lunn  <andrew.lunn@ascom.ch>

	* src/hal_diag_dcc.{ch}
	* src/hal_diag.c
	* src/hal_diag_dbg.c
	* cdl/hal_arm_at91.cdl: Add support for DCC, ie the Debug
	Communications Channel, which is part of JTAG core of AT91 and
	most ARM processors. JTAG devices often make this available via a
	TCP port which can be accessed via telnet. NOTE: Only output to
	DCC has been tested via diag_printf. Code exists for input, but it
	has not been tested.
	
2007-03-05  Andrew Lunn <andrew.lunn@ascom.ch>

	* include/var_io.h: Fix a few typos pointed out by
	Igor B. Poretsky.
	
2007-02-13  John Eigelaar <jeigelaar@mweb.co.za>
 
 	* include/var_io.h: Fixed up the EMAC definitions to work
 	with the brand new EMAC driver  

2007-02-01  Andrew Lunn  <andrew.lunn@ascom.ch>

	* include/var_io.h: Added PWM registers.

2007-01-25  Andrew Lunn  <andrew.lunn@ascom.ch>

	* include/var_io.h (AT91_PITC_VALUE_MASK): New - mask to access
	the PITC value which is a 20 bit number.
	* src/timer_pit.c: Change all hard coded mask for the period, 
	some of which were wrong, to use AT91_PITC_VALUE_MASK. 
	When initializing the PIT, remember to decrement the period first.
	Bugs found by Jim Seymour.

2006-09-08  John Eigelaar <jeigelaar@mweb.co.za>

	* include/var_io.h: Added definition for SPI MODFDIS bit 

2008-01-10  Jonathan Larmour  <jifl@eCosCentric.com>

	* cdl/hal_arm_at91.cdl: Virtual vector support is no longer
	mandatory. Make it an option instead:
	CYGFUN_HAL_AT91_VIRTUAL_VECTOR_SUPPORT with default set
	according to startup type etc.
	* include/hal_diag.h: Provide non-virtual vector HAL diag
	macros.
	* src/at91_misc.c (hal_hardware_init): hal_if_init() is only
	for VV configs.
	Init clock in non-VV configs so that HAL_DELAY_US works.
	Call initialisation of AT91 eth driver platform-specific
	aspects here (HAL_PLF_ETH_INIT), to ensure that clock is
	already set up, so that delays work.
	(hal_default_isr): Default ISR, needed for non-VV configs.
	* src/hal_diag.c: Separate out VV-specific functions and
	conditionalise them. Provide implementations of non-VV
	HAL diag macros (hal_at91_diag_init/write_char/read_char).

2007-11-29  Nick Garnett  <nickg@ecoscentric.com>

	* src/at91_misc.c (hal_hardware_init): Add call to
	hal_clock_initialize() to try to avoid PIT hardware bugs.

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

	* src/timer_pit.c (hal_clock_initialize, hal_clock_reset) 
	(hal_clock_read): Updated to match code in SAM9 HAL to deal with
	bugs detected in the PIT hardware.

2007-10-19  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/var_io.h: Fix AT91_EMAC_NCFG_RLCE value.
	Fix AT91_EMAC_RSR_OVR comment.
	Fix AT91_EMAC_USRIO value.

2007-10-18  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h (AT91_US_IER_CTSIC, AT91_US_CSR_CTS): Add
	definitions for these bits for SAM7 variants only. These allow
	implementation of flow control on those serial devices that
	support it.

2007-10-17  Nick Garnett  <nickg@ecoscentric.com>

	* src/at91_misc.c (sys_irq_handler): Modify memory controller
	interrupt code in line with new definitions and add support for
	second flash controller on SAM7 '512 variants.

2007-10-12  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Rearrange flash controller definitions to
	accommodate '512 variants that have two controllers. These
	definitions should also work for later variants that may have more
	than two.

2007-09-25  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/var_io.h: Bring EMAC definitions into line more with anoncvs.

2007-06-21  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/var_io.h: Add more USART control reg and mode reg settings.

	* src/hal_diag.c (cyg_hal_plf_serial_init_channel): Always ensure
	RTS is on.

2007-03-05  John Dallaway  <jld@ecoscentric.com>

	* cdl/hal_arm_at91.cdl: Reference per-package HTML documentation.

2007-03-02  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Add macros to write the IDR and IER registers
	of a UART. This is needed to support masking of the DEBUG UART.

	* include/hal_diag.h: Change extern on hal_at91_reset_cpu() to
	__externC, change all other externC's to __externC.

	* src/at91_misc.c (hal_sysirq_mask): Add support for masking
	devices on the shared SYSIRQ vector. Currently only PIT and DEBUG
	UART are handled.	

	* src/hal_diag.c (cyg_hal_plf_serial_control): Use UART IDR/IER
	macros for interrupt control.

	* src/timer_pit.c: Add profiling support using TC0.
	
2007-02-22  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Get CAN definitions into a usable state.

	* cdl/hal_arm_at91.cdl: Add option for each UART.

2006-11-02  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Tidied up SPI-related definitions.

2006-10-30  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h (AT91_TWI_MMR_DADR): Fixed some typos and made
	TWI definitions compatible with I2C driver.

2006-10-27  Nick Garnett  <nickg@ecoscentric.com>

	* doc/at91.sgml: Added variant documentation.

2006-10-20  Nick Garnett  <nickg@ecoscentric.com>

	* src/at91_misc.c (sys_irq_handler): Changed instances of DBG to
	DEBUG. This was affecting delivery of DEBUG UART interrupts.

2006-10-12  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Added definitions for SAM7A3.

2006-10-10  Nick Garnett  <nickg@ecoscentric.com>

	* src/hal_diag.c: Move at91_ser_channels[] to top of file and make
	use of CDL interfaces to control contents.

	* include/var_io.h: Some reorganization of PDC registers.

	* cdl/hal_arm_at91.cdl: Added interfaces for platform HALs to
	indicate which serial devices are present.

2006-10-05  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Merged from anoncvs and added support for
	SAM7A1/2.

	* include/var_arch.h (HAL_IDLE_THREAD_ACTION): Added SAM7A1/2
	variant. Disabled since it appears to cause stalls.

	* include/hal_diag.h: Added hal_at91_set_leds().

	* src/hal_diag.c: Tidied up in various areas. Adjusted for
	SAM7A1/2 parts.

	* src/at91_misc.c: Removed clock support, now handled in one of
	several files. Merged SYSINT support for SAM7 parts from
	anoncvs. Added SAM7A1/2 support. Moved profiling elsewhere.

	* cdl/hal_arm_at91.cdl: Merged from anoncvs to add support for
	SAM7 family of processors.

	* src/timer_tc.c: Merged from anoncvs. Moved profiling code here.

	* src/timer_st.c: Added to support simple timers on SAM7A1/2
	parts.
	
	* src/timer_pit.c: Merged from anoncvs.	

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

	* src/at91_misc.c, cdl/hal_arm_at91.cdl: add a profiling timer.

2005-09-14  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/var_io.h: Define RTC registers. Include config header
	for this package since we reference what it defines.

2005-08-04  Nick Garnett  <nickg@ecoscentric.com>

	* include/var_io.h: Added definitions to support SPI on the
	M55800A.

2005-05-05  Nick Garnett  <nickg@ecoscentric.com>

	* src/hal_diag.c: Modified to use PDC for reception. This gives us
	the leeway to run at higher baud rates, which the lack of FIFOs
	would otherwise preclude.

2004-04-15  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/hal_diag.c (hal_diag_led): Prototype hal_at91_set_leds to
	silence warning.

2004-01-23  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/var_io.h: Define Watchdog registers correctly for
	AT91M42800A.

	* src/at91_misc.c (hal_at91_reset_cpu): Reset
	CYGHWR_HAL_ARM_AT91_M42800A using correct registers.
	(hal_hardware_init): Disable watchdog always.

2003-12-05  Andrew Lunn  <andrew.lunn@ascom.ch>

	* include/hal_diag.h: hal_delay_us() is a C function.

2003-12-02  Thomas Koeller  <thomas.koeller@baslerweb.com>

	* include/var_io.h: Improved accuracy for baud rate divider
	computation.

2003-10-23  Thomas Koeller  <thomas.koeller@baslerweb.com>

	* src/at91_misc.c: Fixed recognition of spurious
	interrupts.
	
2003-08-21  Thomas Koeller  <thomas.koeller@baslerweb.com>

        * include/var_io.h:
        Fixed minor typo.
	
2003-08-20  Daniel Néri  <daniel.neri@sigicom.se>

	* include/var_io.h: Fix typos (duplicates) from last change.

2003-08-18  Thomas Koeller  <thomas.koeller@baslerweb.com>

        * include/var_io.h:
        Added bitmask definitions for PIO.
	
2003-08-06  Daniel Néri  <daniel.neri@sigicom.se>

	* src/at91_misc.c (hal_clock_reset):
	Don't acknowledge interrupt here (this is handled
	in Cyg_RealTimeClock::isr).

2003-07-18  Nick Garnett  <nickg@balti.calivar.com>

	* cdl/hal_arm_at91.cdl:
        Changed values for CYGNUM_HAL_RTC_NUMERATOR,
        CYGNUM_HAL_RTC_DENOMINATOR and CYGNUM_HAL_RTC_PERIOD to
        "default_value" from "calculated". This makes it easier
        to change these values globally.
        
2003-06-25  Daniel Néri  <daniel.neri@sigicom.se>

	* src/at91_misc.c (hal_interrupt_set_level): Fix assert condition;
	AT91 interrupt priority levels are between 0 and 7.

2003-06-24  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/var_io.h: Remove not seemingly useful AT91_PMC_SCER_CPU.

	* cdl/hal_arm_at91.cdl: We have a var_arch.h so define
	CYGBLD_HAL_ARM_VAR_ARCH_H.

	* include/var_arch.h: New file containing
	overrides for hal_arch.h.
	(HAL_IDLE_THREAD_ACTION): override here by defining power saving modes
	for idle actions.

2003-06-04  Daniel Néri  <daniel.neri@sigicom.se>

	* src/at91_misc.c (hal_hardware_init): Make sure the AIC internal
	priority level stack is flushed.
	(hal_IRQ_handler): Calculate active interrupt by dummy read from
	the IVR, which has the side-effect of updating ISR with the
	current interrupt source number.
	(hal_interrupt_acknowledge): Write to ICCR is not needed, as
	interrupt deassertion is taken care of by read of IVR in
	hal_IRQ_handler.

2003-05-27  Daniel Néri  <daniel.neri@sigicom.se>

	* include/var_io.h: Add missing USART register defines.
	Fix cut'n'paste typos in AT91_PS defines.

2003-05-16  Daniel Néri  <daniel.neri@sigicom.se>

	* include/var_io.h: Add missing PIO register defines. Add
	CPU clock disable command bit.

2003-05-15  Thomas Koeller  <thomas.koeller@baslerweb.com>

	* include/hal_diag.h:
	* src/at91_misc.c: Added function to generate a hardware reset
	using the watchdog.
	
2003-05-15  Nick Garnett  <nickg@balti.calivar.com>

	* src/at91_misc.c (hal_delay_us): Added calculation to better
	approximate the number of timer ticks for a given number of
	microseconds. This code also now adjust to the actual CPU clock
	speed on different platforms.

2003-05-12  Nick Garnett  <nickg@balti.calivar.com>

	* src/at91_misc.c: Change definition of hal_IRQ_handler() to be
	variant-indepenendent, and to use HAL_LSBIT_INDEX() rather than an
	explicit scan of the ipr bits. Tidied up file a little to make
	more readable.

	* include/var_io.h: Reorganized to allow platform HALs to define
	base addresses of on-chip devices if they differ from the defaults
	defined here. Added variant definitions of Power Management
	devices for different parts.

	* cdl/hal_arm_at91.cdl:	Calculate CYGNUM_HAL_RTC_PERIOD from
	CYGNUM_HAL_ARM_AT91_CLOCK_SPEED, which is defined by the platform.
	Added CYGHWR_HAL_ARM_AT91 to define the specific Atmel AT91 part
	being supported. This must be defined by the platform HAL.
	Added define_proc to generate CYGBLD_HAL_ARM_VAR_IO_H.

	* src/hal_diag.c (hal_diag_led): Now calls hal_at91_set_leds().

2002-07-14  Tim Drury <tdrury@siliconmotorsports.com>

	* cdl/hal_arm_at91.cdl: moved clock speed parameter to platform specific cdl
	* include/var_io.h: added PIO_PDSR register
	* src/hal_diag.c: added hal_diag_led()

2002-05-28  Thomas Koeller  <Thomas.Koeller@baslerweb.com>

	* include/plf_io.h: Add watchdog definitions.

2002-05-08  Gary Thomas  <gthomas@redhat.com>

	* misc/redboot_ROMRAM.ecm:
	* misc/redboot_ROM.ecm: Disable 'fconfig' since the FLASH is too small.

2001-08-17  George Hampton <george.hampton@intel.com>
2001-08-17  Gary Thomas  <gthomas@redhat.com>

	* include/hal_platform_ints.h (CYGNUM_HAL_ISR_COUNT): PR 22864
	Don't adjust by "min" value if not doing translations.
	
2001-07-26  Gary Thomas  <gthomas@redhat.com>

	* src/at91_misc.c (hal_clock_initialize): 
	* cdl/hal_arm_at91.cdl: Increase system clock (RTC) to run at 1MHz for
	better timing resolution.  CAUTION! this means that the system clock tick
	can never be more than 64ms.

2001-07-23  Gary Thomas  <gthomas@redhat.com>

	* include/pkgconf/mlt_arm_at91_eb40_romram.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_romram.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_romram.h: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.h: 
	* cdl/hal_arm_at91.cdl: Fix MLT files (names, layout).

2001-07-20  Gary Thomas  <gthomas@redhat.com>

	* include/plf_io.h: Add UART interrupt definitions.

	* src/hal_diag.c (cyg_hal_plf_serial_control): Enable ^C support.

	* src/at91_misc.c (hal_clock_initialize): Add clock/rtc implementation.

	* include/pkgconf/mlt_arm_at91_eb40_romram.ldi: 
	Replace missing 'fixed vectors'.

2001-07-19  Gary Thomas  <gthomas@redhat.com>

	* misc/redboot_ROMRAM.ecm: New exported config.

	* include/pkgconf/mlt_arm_at91_eb40_romram.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.ldi: 
	* include/hal_platform_setup.h: Fix ROMRAM startup mode.  Note: I
	can't get the onboard SRAM at 0x00100000 to work, so for now, this
	will just have to go in low external RAM.  Thus the change for the
	RAM base address in startup=RAM mode.

	* src/hal_diag.c (cyg_hal_plf_serial_getc_timeout): Remove debug code.

	* src/at91_misc.c (set_leds): LEDs are on D4/D2/D1.

	* misc/redboot_ROM.ecm: 
	* misc/redboot_RAM.ecm: Exported configurations.

	* include/pkgconf/mlt_arm_at91_eb40_romram.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_romram.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_romram.h: New startup type.
	
	* include/pkgconf/mlt_arm_at91_eb40_rom.h: Fix heap layout.

	* include/pkgconf/mlt_arm_at91_eb40_ram.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.h: 
	Fix heap layout.  Move RAM load address to leave room for RedBoot/GDB.

	* include/plf_io.h: Add definitions for PIO, EBI and PS.

	* include/hal_platform_setup.h: ROM startup mode now works.
	First attempt at ROMRAM startup - not yet working.

	* cdl/hal_arm_at91.cdl: Add ROMRAM startup mode.

2001-07-18  Gary Thomas  <gthomas@redhat.com>

	* src/hal_diag.c: More complete initialization.

	* src/at91_misc.c: Support interrupt controller, delay_us().

	* include/plf_io.h: Add interrupt controller, timer definitions.

	* cdl/hal_arm_at91.cdl: Fix clock speed, number I/O channels.

2001-07-16  Gary Thomas  <gthomas@redhat.com>

	* src/hal_diag.c: 
	* src/at91_misc.c: 
	* include/pkgconf/mlt_arm_at91_eb40_rom.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_rom.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_rom.h: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.mlt: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.ldi: 
	* include/pkgconf/mlt_arm_at91_eb40_ram.h: 
	* include/plf_stub.h: 
	* include/plf_io.h: 
	* include/hal_platform_setup.h: 
	* include/hal_platform_ints.h: 
	* include/hal_diag.h: 
	* include/hal_cache.h: 
	* cdl/hal_arm_at91.cdl: New port - cloned from E7T.

//===========================================================================
// ####GPLCOPYRIGHTBEGIN####                                                
// -------------------------------------------                              
// This file is part of eCos, the Embedded Configurable Operating System.   
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
// Copyright (C) 2004, 2005, 2007, 2008 eCosCentric Limited                 
//
// This program 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.                                                           
//
// This program 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 this program; if not, write to the                            
// Free Software Foundation, Inc., 51 Franklin Street,                      
// Fifth Floor, Boston, MA  02110-1301, USA.                                
// -------------------------------------------                              
// ####GPLCOPYRIGHTEND####                                                  
//===========================================================================
