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

	* src/at91rm9200_mmc.c (at91rm9200_mci_xfer_blocks):
	cyg_mmcsd_check_transfer_ok() now takes card argument too.

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

	* src/at91rm9200_mmc.c (calc_dtor): Don't throw an error if we
	overflow, instead just set to max.

2008-07-24  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/at91rm9200_init.inc (at91rm9200_init_clocks): Only wait for
	MCKRDY is we set CSS.

2008-05-08  Jonathan Larmour  <jifl@eCosCentric.com>

	* doc/at91rm9200.sgml: Update to reflect new support for SD
	cards.
	* src/at91rm9200_mmc.c (at91rm9200_mci_xfer_blocks): Now we only
	do one block transfer operation per call.
	Use generic MMC/SD driver's cyg_mmcsd_check_transfer_ok() to
	check for errors, rather than our own checks.

2008-04-24  Jonathan Larmour  <jifl@eCosCentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Revise MCI driver CDL
	to reflect changes in the generic MMC/SD driver such as
	SD support.
	* src/at91rm9200_mmc.c: Revise driver substantially for
	updated generic MMC/SD support, including many API changes,
	data timeout calculations, 4-bit support, platform
	abstractions, removeable media support, SD support,
	card detection (including by interrupt), etc.etc.

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

	* include/at91rm9200_init.inc (at91rm9200_init_mmu): Rename
	rom_image_phys_base to rom_image_virt_base, which is what it
	really is.
	Allow rom_image_virt_base to be an arbitrary value, rather than
	having only up to 8-bits set in a row.

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

	* include/at91rm9200.h: Add new USART control reg and mode reg
	definitions in line with AT91 variant HAL.

2007-03-27  Jonathan Larmour  <jifl@eCosCentric.com>

	* include/at91rm9200.h: Include cyg_type.h for __externC declaration.
	Thanks to Alan Bowman.

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

	* src/at91rm9200_i2c.c (at91rm9200_i2c_bus_tx): Send stop straight
	away if only one byte to send.
	(at91rm9200_i2c_bus_rx): Likewise for receiving.
	Thanks to Alan Bowman.

2006-12-18  John Dallaway  <jld@ecoscentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Reference package documentation.

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

	* include/at91rm9200.h: Updated some definitions to match changes
	in serial device driver.

	* src/hal_diag.c: 
	* cdl/hal_arm_arm9_at91rm9200.cdl: Rename serial line interfaces
	to match those in ARM7 based HALs, since we share the device
	driver.

2006-09-21  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/at91rm9200_i2c.c: Include var_ints.h to ensure we can always
	get CYGNUM_HAL_INTERRUPT_TWI. Fix for bug 1000317.

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

	* src/at91rm9200_mmc.c (at91rm9200_mci_xfer_blocks): ARM920
	HAL_DCACHE_SYNC() implementation no longer does implicit
	invalidate, so do it ourselves.

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

	* src/at91rm9200_misc.c: Initialise HAL clock if using kernel version
	of microsecond delay VV.

2006-06-28  John Dallaway  <jld@ecoscentric.com>

	* doc/at91rm9200.sgml: Eradicate broken links in HTML output.

2006-06-27  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/at91rm9200_powersave.c (SRAM_VIRT_BASE): Use
	CYGARC_VIRTUAL_ADDRESS on sram phys address to determine virtual
	address.
	(PLLA_INIT): Remove and instead use new
	AT91RM9200_PLF_PLLA_POWERSAVE_80MHZ define to allow platform to set
	PLLA.
	(cyg_hal_at91rm9200_powerdown_clocks): Use
	AT91RM9200_PLF_PLLA_POWERSAVE_80MHZ.

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

	* src/at91rm9200_powersave.c (SRAM_VIRT_BASE): Added definition
	for DNP/SK23.

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

	* doc/at91rm9200.sgml: New documentation file, partly based on
	contents of EK board docs, partly on IXP4xx docs, and lots of
	new material.
	* doc/cldiv-equation.png: New file accompanying TWI docs, originally
	from EK HAL.
	* src/at91rm9200_misc.c (hal_interrupt_configure): Support
	rising/falling edge and high/low level interrupts.

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

	* include/at91rm9200_init.inc: New file. Common macro functions
	that can be used by platforms to save duplication of effort with
	AT91RM9200 initialisation.

2005-12-22  John Dallaway  <jld@ecoscentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Specify executable filenames
	for I2C and powersave tests.

2005-12-21  Jonathan Larmour  <jifl@eCosCentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Allow building of I2C test by
	user option, and make build of powersave test a user option.

	* src/at91rm9200_mmc.c: Add extra debug level (3) for packet dumps.
	(pbuf): new function to do packet dumps.
	(at91rm9200_mci_read_register): Silence warning.
	(at91rm9200_mci_xfer_blocks): Ensure cache line alignment of
	swappedbuf, which is now renamed tmpbuf. Use it for rx as well.
	Debug verbosity tweaks. Output packet data via debug.
	ASSERT on buf should be PRECONDITION.
	Move start of RX DMA later to avoid corruption if started too
	soon.
	With cache line alignment, no more need to disable ints around
	dcache sync.
	For tx, don't invalidate as well - redundant on ARM920T after sync.

2005-12-12  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/at91rm9200_mmc.c: Remove temporary testing changes.
	Set CLKDIV correctly, allowing for overflow.
	(arm_global_ints_are_on): Use HAL_QUERY_INTERRUPTS instead of
	forcing a disable.
	(at91rm9200_mci_send_command): this method now takes the bus
	on the arg list, to allow for bus, not card specific commands.
	Add pseudo-command for special AT91RM9200 init sequence.
	Rewrite GO_IDLE command.
	Only need 5 cycles for SEND_OP_COND.
	Allow selection (CMD7) to change speed.
	(at91rm9200_mci_bus_init): Do do a full reset.
	Use defines for default mode.
	(at91rm9200_mci_read_register): Support MMC_REQUEST_SEND_STATUS.
	Swap CID/CSD endianness.
	(at91rm9200_mci_xfer_blocks): Use appropriate clock speed for card.
	Loop correctly for multiple blocks (although we don't really
	support that yet).
	Only enable TX DMA _after_ command sent.
	Disable ints around dcache sync to avoid cache line conflict with
	interrupts.
	Various debugging additions throughout, default off.
	* cdl/hal_arm_arm9_at91rm9200.cdl: New
	CYGNUM_HAL_ARM_ARM9_AT91RM9200_MCI_POWERSAVE_DIVIDER option to
	give user control.

2005-11-18  Jonathan Larmour  <jlarmour@dargo.barn.ecoscentric.com>

	* src/at91rm9200_misc.c (hal_interrupt_mask): Remove cruft
	accidentally introducd in last change.

2005-11-04  Jonathan Larmour  <jifl@eCosCentric.com.

	* src/hal_diag.c (cyg_hal_plf_serial_control): When IRQs are on,
	we shouldn't ask for the timeout interrupt - no point to it, and
	will cause spurious interrupts on UARTs (other than the
	DEBUG UART) when global ints are enabled.
	(cyg_hal_plf_serial_init_channel): No point setting UART_IMR - it's
	read-only. But instead maybe ensure vector is masked in intc.
	* src/at91rm9200_misc.c (hal_interrupt_mask): ensure we explicitly
	return if asked to mask an interrupt >= DEBUG (the "virtual"
	interrupts).
	* src/at91rm9200_mmc.c: Set initial clock speed to something over
	117kHz to avoid incorrect CLKDIV.
	Various temporary testing changes.
	
2005-11-03  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/at91rm9200_mmc.c (at91rm9200_mci_isr): Allow callers
	to set a shared status_check_bits field to indicate sr bits
	to check, rather than using int mask.
	(at91rm9200_mci_send_command): Set intmask to only report
	command ready, to check for completion. But ask ISR to
	check other bits so we know about errors after command
	completion.
	(at91rm9200_mci_read_register): Remove response variable
	hangover from earlier debugging.
	(at91rm9200_mci_xfer_blocks): Ask ISR to check all bits
	set in the intmask.

2005-10-28  Jonathan Larmour  <jifl@eCosCentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Add configuration for new
	MultiMediaCard Interface (MCI) driver.
	* include/at91rm9200.h: Many definitions added for MCI support.
	* src/at91rm9200_mmc.c: New MCI driver file. Still some fixes
	required.

	* src/at91rm9200_i2.c: Remove handled FIXMEs. Make interrupt
	objects and other globals static as they should have been.

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

	* src/at91rm9200_powersave.c : Added support for polling GPIO
	lines during low power mode and made ethernet polling
	optional. Also added option to define the set of devices left
	running during low power mode.

	* cdl/hal_arm_arm9_at91rm9200.cdl: Added some configuration
	options for the power saving implementation.

	* tests/powersave.c (entry0): Added some extra diagnostics.

2005-10-07  Nick Garnett  <nickg@ecoscentric.com>

	* src/at91rm9200_powersave.c: Implementation of a simple power
	saving mechanism.

	* include/var_ints.h: Added prototypes for power saving support.

	* tests/powersave.c: Added test for power saving.

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

	* cdl/hal_arm_arm9_at91rm9200.cdl: Add CDL support for TWI/I2C
	driver.
	* include/at91rm9200.h: Add TWI register definitions.
	* src/at91rm9200_i2c.c: Add new TWI/I2C driver.
	* tests/at24c02a-i2c.c: Add test for AT24C02A I2C EEPROM as
	found on the Aardvark I2C/SPI activity board.	

2005-09-01  Bart Veer  <bartv@eCosCentric.com>

	* src/at91rm9200_misc.c (profile_dsr): New function to enable
	timer-based profiling.
	(profile_isr): Ditto.
	(hal_enable_profile_timer): Ditto.
	* cdl/hal_arm_arm9_at91rm9200.cdl: Indicate support for
	timer-based profiling.

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

	* src/hal_diag.c: Don't put baud_rate near the start of
	channel_data_t otherwise it breaks initializers.

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

	* src/at91rm9200_misc.c (_at91rm9200_hardware_init): Always
	reclaim FIQ/IRQ VSRs for this application, irrespective of
	CYGSEM_HAL_USE_ROM_MONITOR.

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

	* include/var_ints.h (CYGNUM_HAL_VSR_MAX): Set to include all the new
	VSRs after all, although the underlying hal_vsr_table is still only
	8 entries.

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

	* cdl/hal_arm_arm9_at91rm9200.cdl: Add CYGINT_HAL_AT91RM9200_AIC_VSR
	interface to indicate platform HAL support for AIC configured VSRs.
	* include/at91rm9200.h:	Add defines for offset of AIC IVR and FVR from
	top of memory.
	* include/var_ints.h: Add VSR vector numbers for vectors to be
	routed using the AIC directly. Add new HAL_VSR_GET/HAL_VSR_GET that
	can put these new vectors into the AIC.
	* src/at91rm9200_misc.c (_at91rm9200_hardware_init): If wanting
	to use AIC VSRs, initialise them with the default ARM HAL FIQ/IRQ
	VSR.
	(hal_IRQ_handler): If using the AIC, use the ISR to get the vector
	number.	

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

	* include/at91rm9200.h: Add various RTC definitions.

2005-08-23  John Dallaway  <jld@ecoscentric.com>

        * cdl/hal_arm_arm9_at91rm9200.cdl: Set default values for
	at91rm9200ek target.

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

	* include/at91rm9200.h: Added definitions for SPI device.

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

	* cdl/hal_arm_arm9_at91rm9200.cdl: Now implements variable baud
	rates in HAL diag.
	* src/hal_diag.c: Include current baud rate in channel data.
	(cyg_hal_plf_serial_init_channel): Use channel specified baud rate.
	(cyg_hal_plf_serial_control): Implement _GETBAUD/_SETBAUD config.
	(cyg_hal_plf_serial_init): Set default channel baud rate.
	
	* include/at91rm9200.h: Define _PMC_SR_MCKRDY and _ETH_CFG_CLK
	subfields.
	* include/var_ints.h: Split system timer interrupts into
	separate "interrupts" since the status register clears once
	read so it can only be done here.
	* src/at91rm9200_misc.c (hal_IRQ_handler): Split system timer
	interrupt as above.
	Use correct registers for RTC intr test.

2005-06-29  John Dallaway  <jld@ecoscentric.com>

        * cdl/hal_arm_arm9_at91rm9200.cdl: Set default values for kb9202
        target.

2005-03-03  Bart Veer  <bartv@ecoscentric.com>

	* include/at91rm9200.h: use the right names for the PIO pull-up
	control registers. Preserve the old ones for compatibility.

	* src/at91rm9200_misc.c: remove broken CSB337 I2C support, now
	implemented in the platform HAL.

2005-02-15  John Dallaway  <jld@ecoscentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Set default values for csb337
	target.

2005-01-10  Nick Garnett  <nickg@ecoscentric.com>

	* src/hal_diag.c: Changed receive buffer to 1 byte. The DEBUG
	channel does not support timeouts, so this is the only way that
	Ctrl-C will work on this channel.
	(cyg_hal_plf_serial_control): Changed interrupts supported to
	ENDRX and TIMEOUT.
	(cyg_hal_plf_serial_isr): Rewritten to use
	cyg_hal_plf_serial_getc_nonblock() for character reception.

	* src/at91rm9200_misc.c (hal_IRQ_handler): Fixed some cut-n-paste
	typos.

2004-12-20  John Dallaway  <jld@ecoscentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: Set default values for kb9200
	target. Add display string for CYGARC_HAL_ARM_ARM9_AT91RM9200_MCK.

2004-12-14  Nick Garnett  <nickg@ecoscentric.com>

	* cdl/hal_arm_arm9_at91rm9200.cdl: 
	* src/hal_diag.c (BAUD_RATE): 
	* include/at91rm9200.h (AT91_US_BAUD): Changed CDL options that
	were unaccountably named ..._KB9200_... to ..._AT91RM9200_... 

2004-12-13  Nick Garnett  <nickg@ecoscentric.com>

	* src/hal_diag.c (cyg_hal_plf_serial_getc_nonblock): Added support
	for using the PDC to receive data. This allows us to run at 115200
	baud where the lack of FIFOs would not otherwise have allowed such
	a speed.

	* src/at91rm9200_misc.c (_at91rm9200_hardware_init): Added
	initialization of system devices. At present this consists mainly
	of ensuring that their interrupts are all masked.
	(hal_IRQ_handler): Added decoding of SYSTEM interrupts into
	separate vectors.
	(hal_interrupt_unmask/mask/configure): Added support for decoded
	SYSTEM interrupts. These sources are not generally maskable or
	configurable independently, so these functions actually operate on
	the SYSTEM vector.

	* include/var_ints.h: Added extended interrupt vectors to support
	decoding of interrupt sources that share the SYSTEM vector.

	* include/at91rm9200.h: Added definitions for additional
	UARTS. Added definitions for RTC registers.

	* cdl/hal_arm_arm9_at91rm9200.cdl: Added configury for setting
	different clock frequencies, and calculating the derived clock
	therefrom. 

2004-06-14  Nick Garnett  <nickg@ecoscentric.com>

	* src/hal_diag.c (cyg_hal_plf_serial_control): Only enable/disable
	RXRDY interrupt here. The others may result in spurious interrupts
	when we don't expect them.

2004-06-11  Nick Garnett  <nickg@ecoscentric.com>

	* src/at91rm9200_misc.c: Added I2C support. Currently disabled
	since there have been problems getting it to work.

	* include/at91rm9200.h: Added some definitions for the Two Wire
	Interface. Added API for the I2C support.

2004-02-23  Nick Garnett  <nickg@ecoscentric.com>

	* src/at91rm9200_misc.c (_at91rm9200_hardware_init): Only
	initialize the interrupt controller when not running under a
	monitor. Otherwise we are likely to mess up any interrupts that
	the monitor has enabled, for example for Ctrl-C handling.

2004-02-20  Nick Garnett  <nickg@ecoscentric.com>

	* include/at91rm9200.h: Added aliases for the use of the AT91
	serial device driver.

2004-02-06  Jonathan Larmour  <jifl@eCosCentric.com>

	* src/at91rm9200_misc.c (hal_interrupt_configure): Implement.
	(hal_interrupt_set_level): Implement.

2003-10-10  eCosCentric

	* src/hal_diag.c: 
	* src/at91rm9200_misc.c: 
	* include/var_ints.h: 
	* include/at91rm9200.h: 
	* cdl/hal_arm_arm9_at91rm9200.cdl: New file(s) - HAL support for
	Atmel AT91RM9200 System-On-Chip (ARM920T variant)

//===========================================================================
// ####GPLCOPYRIGHTBEGIN####                                                
// -------------------------------------------                              
// This file is part of eCos, the Embedded Configurable Operating System.   
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
// Copyright (C) 2003, 2004, 2005, 2006, 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####                                                  
//===========================================================================
