Skip to contentSkip to conversation

AT91 timer patch broke DataFlash driver

U-Boot Harald Kipp 1 participant 2 messages Mar 10, 2011

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Answering myself

Quoted 7 lines · Harald Kipp

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.

http://patchwork.ozlabs.org/patch/80747/
fixes this. Sorry for the noise.

Regards,

Harald