[U-Boot] AT91 timer patch broke DataFlash driver

Harald Kipp harald.kipp at egnite.de
Thu Mar 10 14:54:00 CET 2011


Hi,

Commit 5dca710a3d7703e41da0e9894f2d71f9e25bea6b
http://lists.denx.de/pipermail/u-boot/2010-October/078600.html
removed the two global routines reset_timer_masked() and 
get_timer_masked() from arch/arm/cpu/arm926ejs/at91/timer.c.

Both routines are still referenced in drivers/spi/atmel_dataflash_spi.c. 
As a result SPI DataFlash support fails to compile for AT91 boards.

This had been also reported by
http://lists.denx.de/pipermail/u-boot/2011-January/085399.html
http://lists.denx.de/pipermail/u-boot/2010-November/081287.html
but the problem still exists in the master trunk and the at91 branch.

For a first test I simply added

void reset_timer_masked(void)
{
	reset_timer();
}

ulong get_timer_masked(void)
{
	return tick_to_time(get_ticks() - gd->timer_reset_value);
}

to drivers/spi/atmel_dataflash_spi.c. All DataFlash functions seem to 
work with this. But I'm not sure if this is a proper replacement for the 
original code.

Regards,

Harald


More information about the U-Boot mailing list